Module: ActsAsSolr::MongoMapper::ClassMethods
- Defined in:
- lib/acts_as_solr/mongo_mapper.rb
Instance Method Summary collapse
Instance Method Details
#columns_hash ⇒ Object
9 10 11 |
# File 'lib/acts_as_solr/mongo_mapper.rb', line 9 def columns_hash keys end |
#find(*args) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/acts_as_solr/mongo_mapper.rb', line 17 def find(*args) if args.first.instance_of? Array ids = args.first.map { |id| Mongo::ObjectID.from_string(id) } super :all, :conditions => {primary_key => ids} else super *args end end |
#primary_key ⇒ Object
13 14 15 |
# File 'lib/acts_as_solr/mongo_mapper.rb', line 13 def primary_key 'id' end |