-
Notifications
You must be signed in to change notification settings - Fork 1
Select specific columns with the :select option during eager loading (:include) for ActiveRecord::Base.find
License
blythedunham/eload-select
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
#this is based on #http://dev.rubyonrails.org/ticket/5371 #and the patch 7147 #http://dev.rubyonrails.org/attachment/ticket/7147/options_select_working_with_eager_loading.diff # #Enhanced to let you apply database functions to columns. These columns will be placed in the attributes of the base class # # ex. Contact.find :first, :include => :account, :select => 'now(), account.name, 123, "YOUR MOM" as blah' # returns a record where the now(), 123, and YOUR MOM is placed in contact['now()'] => "12007-07-09 blah', contact['123'] => '123', contact['blah'] => "YOUR MOM" # contact.account.name will return the account name # # Also adding support for pre_sql, post_sql, keywords #
About
Select specific columns with the :select option during eager loading (:include) for ActiveRecord::Base.find
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published