Module: Likeable::MongoidAdapter
- Defined in:
- lib/likeable/adapters/mongoid_adapter.rb
Class Method Summary collapse
Class Method Details
.cast_id ⇒ Object
3 4 5 |
# File 'lib/likeable/adapters/mongoid_adapter.rb', line 3 def self.cast_id lambda { |id| id.to_s } end |
.find_many ⇒ Object
13 14 15 16 17 |
# File 'lib/likeable/adapters/mongoid_adapter.rb', line 13 def self.find_many lambda { |klass, ids| klass.find ids } end |
.find_one ⇒ Object
7 8 9 10 11 |
# File 'lib/likeable/adapters/mongoid_adapter.rb', line 7 def self.find_one lambda { |klass, id| klass.find id } end |