Module: Slugged::Scopes
- Defined in:
- lib/slugged/scopes.rb
Instance Method Summary collapse
Instance Method Details
#other_than(record) ⇒ Object
8 9 10 |
# File 'lib/slugged/scopes.rb', line 8 def other_than(record) record.new_record? ? where(nil) : where("#{quoted_table_name}.#{connection.quote_column_name(:id)} != ?", record.id) end |
#with_cached_slug(slug) ⇒ Object
4 5 6 |
# File 'lib/slugged/scopes.rb', line 4 def with_cached_slug(slug) where(self.cached_slug_column => slug.to_s) end |