Method: Scrivito::BasicObj.find_by_permalink
- Defined in:
- app/cms/scrivito/basic_obj.rb
.find_by_permalink(permalink) ⇒ Obj
Returns the Obj with the given permalink, or nil
if no matching Obj exists.
335 336 337 338 |
# File 'app/cms/scrivito/basic_obj.rb', line 335 def self.find_by_permalink(permalink) Workspace.current.objs.find_one_by(:permalink, permalink, type_computer.obj_class_name_for_type(self)) end |