Module: FriendlyId::ActiveRecordAdapter::Finders

Defined in:
lib/friendly_id/active_record_adapter/finders.rb

Defined Under Namespace

Classes: Find

Instance Method Summary collapse

Instance Method Details

#find_one(id, options) ⇒ Object



135
136
137
138
139
# File 'lib/friendly_id/active_record_adapter/finders.rb', line 135

def find_one(id, options)
  return super if id.blank? || id.unfriendly_id?
  finder = Find.new(self, id, options)
  finder.find_one or super
end

#find_some(ids, options) ⇒ Object



141
142
143
144
145
# File 'lib/friendly_id/active_record_adapter/finders.rb', line 141

def find_some(ids, options)
  return super if ids.empty?
  finder = Find.new(self, ids, options)
  finder.find_some
end