Sha256: bc082b82392e4a7e957e6fd24c9b493510883466b2e5876b77ff3b97700f25c3
Contents?: true
Size: 307 Bytes
Versions: 2
Compression:
Stored size: 307 Bytes
Contents
module Pseudocephalopod module Scopes def with_cached_slug(slug) where(self.cached_slug_column => slug.to_s) end def other_than(record) record.new_record? ? scoped : where("#{quoted_table_name}.#{connection.quote_column_name(:id)} != ?", record.id) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pseudocephalopod-0.3.1 | lib/pseudocephalopod/scopes.rb |
pseudocephalopod-0.3.0 | lib/pseudocephalopod/scopes.rb |