class method self.create

Ruby on Rails 1.0.1

Last seen in v1.3.0

Available in: v1.0.1 v1.1.0 v1.2.1 v1.3.0

Signature

self.create(model, options = {})

No documentation comment.

Parameters

model req
options opt = {}
Source
# File lib/global_id/global_id.rb, line 12
    def create(model, options = {})
      if app = options.fetch(:app) { GlobalID.app }
        params = options.except(:app, :verifier, :for)
        new URI::GID.create(app, model, params), options
      else
        raise ArgumentError, 'An app is required to create a GlobalID. ' \
          'Pass the :app option or set the default GlobalID.app.'
      end
    end

Defined in lib/global_id/global_id.rb line 12 · View on GitHub · Improve this page · Find usages on GitHub

Defined in GlobalID

Type at least 2 characters to search.

↑↓ navigate · open · esc close