Adds a finder that explictly uses slugs from the slug table.
Search for a record in the slugs table using the specified slug.
# File lib/friendly_id/history.rb, line 98 def exists?(id = false) return super if id.unfriendly_id? exists_without_friendly_id?(@klass.friendly_id_config.query_field => id) or with_old_friendly_id(id) {|x| exists_without_friendly_id?(x)} or exists_without_friendly_id?(id) end
Search for a record in the slugs table using the specified slug.
# File lib/friendly_id/history.rb, line 90 def find_one(id) return super(id) if id.unfriendly_id? where(@klass.friendly_id_config.query_field => id).first or with_old_friendly_id(id) {|x| find_one_without_friendly_id(x)} or find_one_without_friendly_id(id) end
Generated with the Darkfish Rdoc Generator 2.