class method
self.create
Ruby on Rails 1.2.1
Last seen in v1.3.0Signature
self.create(model, options = {})
No documentation comment.
Parameters
-
modelreq -
optionsopt = {}
Source
# File lib/global_id/global_id.rb, line 11
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 11
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in GlobalID