class method
self.create
Ruby on Rails 1.0.1
Last seen in v1.3.0Signature
self.create(app, model, params = nil)
Shorthand to build a URI::GID from an app, a model and optional params.
URI::GID.create('bcx', Person.find(5), database: 'superhumans')
Parameters
-
appreq -
modelreq -
paramsopt = nil
Source
# File lib/global_id/uri/gid.rb, line 67
def create(app, model, params = nil)
build app: app, model_name: model.class.name, model_id: model.id, params: params
end
Defined in lib/global_id/uri/gid.rb line 67
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in URI::GID