Class: Refinery::Pages::Finder::FinderBySlug

Inherits:
Refinery::Pages::Finder show all
Defined in:
pages/lib/refinery/pages/finder.rb

Instance Method Summary collapse

Methods inherited from Refinery::Pages::Finder

by_path, by_path_or_id, by_slug, by_title, #find, with_mobility, #with_mobility

Constructor Details

#initialize(slug, conditions) ⇒ FinderBySlug

Returns a new instance of FinderBySlug.



75
76
77
78
# File 'pages/lib/refinery/pages/finder.rb', line 75

def initialize(slug, conditions)
  @slug = slug
  @conditions = default_conditions.merge(conditions)
end

Instance Method Details

#default_conditionsObject



80
81
82
83
84
85
# File 'pages/lib/refinery/pages/finder.rb', line 80

def default_conditions
  {
    :locale => Refinery::I18n.frontend_locales.map(&:to_s),
    :slug => slug
  }
end