Module: Slugs::ActiveRecord::Relation
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/slugs/active_record/relation.rb
Instance Method Summary collapse
Instance Method Details
#exists?(id = false) ⇒ Boolean
10 11 12 |
# File 'lib/slugs/active_record/relation.rb', line 10 def exists?(id=false) (sluggable? and id.is_a? String) ? (exists_by_slug(id) || super) : super end |
#find_one(id) ⇒ Object
6 7 8 |
# File 'lib/slugs/active_record/relation.rb', line 6 def find_one(id) (sluggable? and id.is_a? String) ? (find_by_slug(id) || super) : super end |