Method: Scrivito::BasicObj.find_by_permalink

Defined in:
app/cms/scrivito/basic_obj.rb

Returns the Obj with the given permalink, or nil if no matching Obj exists.

Parameters:

  • permalink (String)

    The permalink of the Obj.

Returns:



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