pages/app/models/refinery/page.rb
# Helps to resolve the situation where you have a path and an id
# and if the path is unfriendly then a different finder method is required
# than find_by_path.
#
# raise ActiveRecord::RecordNotFound if not found.
Helps to resolve the situation where you have a path and an id
and if the path is unfriendly then a different finder method is required
than find_by_path.


Helps to resolve the situation where you have a path and an id and if the path is unfriendly then a different finder method is required than find_by_path .
def find_by_path_or_id!(path, id)
        page = find_by_path_or_id(path, id)
        raise ActiveRecord::RecordNotFound unless page
        page
      end
def find_by_path_or_id! ( path , id ) page = find_by_path_or_id ( path , id ) raise ActiveRecord :: RecordNotFound unless page page end
Helps to resolve the situation where you have a path and an id
and if the path is unfriendly then a different finder method is required
than find_by_path.
Helps to resolve the situation where you have a path and an id and if the path is unfriendly then a different finder method is required than find_by_path .
path
id