Commit Graph

10 Commits

Author SHA1 Message Date
Steve Richert e55e99fe89 Use class attributes properly so that inheritance is respected
This fixes two bugs:

1. Subclasses were not properly inheriting their parents' Ransack
   aliases in Mongoid because each class defined its very own set of
   aliases.
2. In Active Record, Ransack aliases were defined in such a way that the
   parent's (and grandparent's, etc.) aliases were overwritten by the
   child, meaning that all aliases were ultimately kept on
   ActiveRecord::Base. This has the unfortunate effect of enforcing
   uniqueness of Ransack alias names across all models rather than per
   model. Depending on the load order of models, earlier definitions of
   an alias in other models would be clobbered.
2016-08-26 13:48:59 -04:00
Jon Atack 2a8eca4847 Wrap lines at 80 chars and keep conditionals explicit and ugly
to motivate us to refactor them out.
2015-12-20 01:01:41 +01:00
Ray Zane e712ff1ce4 Allow creating aliases for ransack attributes 2015-12-11 18:34:47 -05:00
Penn Su f55770f4d7 Include embedded relations 2015-01-21 01:24:08 -08:00
Zhomart Mukhamejanov d2b02689cb added some features to ransack/mongoid 2014-08-02 14:25:52 -07:00
Zhomart Mukhamejanov 2ef4210f85 added active_record style method Mongoid::Document.first(n) 2014-08-02 11:08:29 -07:00
Zhomart Mukhamejanov b85abef5ed ransack method for Mongoid::Document improved 2014-08-02 10:35:51 -07:00
Zhomart Mukhamejanov 718a05b331 ransack made more abstract and added mongoid 2014-08-01 21:06:39 -07:00
Zhomart Mukhamejanov 7cb697a98c adapter/mongoid little bit adapted 2014-08-01 02:05:25 -07:00
Zhomart Mukhamejanov d16c8b0c1b mongoid initialized 2014-07-31 23:42:22 -07:00