Method: Scrivito::BasicObj.find_by_path

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

.find_by_path(path) ⇒ Obj

Find the Obj with the given path. Returns nil if no matching Obj exists.

Parameters:

  • path (String)

    Path of the Obj.

Returns:



307
308
309
310
# File 'app/cms/scrivito/basic_obj.rb', line 307

def self.find_by_path(path)
  Workspace.current.objs.find_one_by(:path, path,
      type_computer.obj_class_name_for_type(self))
end