Method: URI::PlateID.create
- Defined in:
- lib/uri/plate_id.rb
.create(model) ⇒ Object
Shorthand to build a URI::PlateID from a model.
URI::PlateID.create(Ngn::Content::Post.find(5))
URI::PlateID.create(Ngn::Content::Post)
89 90 91 92 |
# File 'lib/uri/plate_id.rb', line 89 def create(model) model = model.new if model.class == Class build(model_name: model.class.name, model_id: model.id) end |