lib/ransack/adapters/mongoid/base.rb in ransack-1.6.6 vs lib/ransack/adapters/mongoid/base.rb in ransack-1.7.0
- old
+ new
@@ -71,20 +71,24 @@
def ransackable_associations(auth_object = nil)
reflect_on_all_associations_all.map { |a| a.name.to_s }
end
def reflect_on_all_associations_all
- reflect_on_all_associations(:belongs_to, :has_one, :has_many)
+ reflect_on_all_associations(:belongs_to, :has_one, :has_many, :embeds_many, :embedded_in)
end
# For overriding with a whitelist of symbols
def ransackable_scopes(auth_object = nil)
[]
end
# imitating active record
def joins_values *args
+ []
+ end
+
+ def custom_join_ast *args
[]
end
def first(*args)
if args.size == 0