aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* :nodoc:s #unscoped until its behavior is more clear, now sometimes works, ↵Xavier Noria2010-08-251-1/+1
| | | | sometimes not
* Merge remote branch 'docrails/master'Xavier Noria2010-08-251-0/+5
|\
| * unscoped does not work when chained with named_scopeNeeraj Singh2010-08-231-0/+5
| |
* | fix broken relative links [#5415 state:committed]Joost Baaij2010-08-241-1/+1
|/ | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Fix docs to reference ActiveRecord::LogSubscriberEvgeniy Dolzhenko2010-08-211-1/+1
| | | | since Rails::LogSubscriber doesn't seem to be defined anymore
* Optimize find_sti_class when store_full_sti_class is trueAndrew White2010-08-191-1/+5
| | | | | | [#5403] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Memoize STI class lookups for the duration of a requestJeremy Kemper2010-08-191-2/+2
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-87/+87
| | | | 's/[ \t]*$//' -i {} \;)
* Removing most of the symbol to proc usage in Active RecordPrem Sichanugrist2010-08-131-3/+3
| | | | This will hopefully make Active Record run a bit more faster.
* commit review: applies guidelines to "# =>"Xavier Noria2010-08-121-2/+2
|
* updating documentation for named_scope and default_scopeNeeraj Singh2010-08-121-0/+10
|
* Merge remote branch 'docrails/master'Xavier Noria2010-08-051-9/+9
|\
| * fixing documentationNeeraj Singh2010-08-031-9/+9
| |
* | I'm unsure how cloning was working in Rails 3 beforewycats2010-08-041-1/+1
|/
* Correcting the documentation which wrongly states that each dynamic finder ↵Neeraj Singh2010-08-021-7/+4
| | | | | | | creates method on the class. Only dynamic finders using <tt>scoped_by_*</tt> creates new methods.
* Adding to AR::Base documentation about dynamically scopeded_by queryNeeraj Singh2010-08-021-9/+17
| | | | User.scoped_by_user_name('David')
* updating documentation to ensure line does not exceed 100 columnsNeeraj Singh2010-08-021-88/+128
|
* slight performance improvement when grabbing an arel tableAaron Patterson2010-07-271-1/+1
|
* Don't interpolate a blank string, avoid warningsSantiago Pastorino2010-07-261-0/+2
|
* Fixes syntax error in "with_scope" exampleArkadiusz Holko2010-07-251-1/+1
|
* Revert "Style fixes"Pratik Naik2010-07-151-1/+1
| | | | This reverts commit 3c300b31219f2af3ecd46ef22b04e5c5548db899.
* Style fixeswycats2010-07-141-1/+1
|
* Style fixesPratik Naik2010-07-141-1/+1
|
* Added reorder delegation for ActiveRecord::Base(to be able to overwrite the ↵Vitalii Khustochka2010-07-131-1/+1
| | | | | | default_scope ordering in the named scope [#5093 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Return from ActiveRecord::Base#attributes= unless value is a hash [#4070 ↵David Trasbo2010-07-081-1/+1
| | | | | | state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* removed an old unused method in AR which removed readonly attributesJosh Kalderimis2010-07-081-9/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* removing unused methodNeeraj Singh2010-07-081-5/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* mass_assignment_security moved from AR to AMo, and minor test cleanupJosh Kalderimis2010-07-081-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* minor changes to mass assignment security patch to bring it in line with ↵Josh Kalderimis2010-07-081-2/+2
| | | | | | rails standards Signed-off-by: José Valim <jose.valim@gmail.com>
* Mass assignment security refactoringEric Chapweske2010-07-081-133/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge remote branch 'docrails/master'Xavier Noria2010-07-071-2/+4
|\
| * clarifying the comments regarding base_class declarationNeeraj Singh2010-07-011-2/+4
| |
* | Make relation a private method.José Valim2010-07-011-5/+6
|/
* Remove ActiveRecord::Base#class_name [#379 state:committed]David Trasbo2010-06-291-8/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Tidy up deprecation message for with_exclusive_scope.José Valim2010-06-291-10/+11
|
* Add scoping and unscoped as the syntax to replace the old with_scope and ↵José Valim2010-06-291-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_exclusive_scope. A few examples: * with_scope now should be scoping: Before: Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end After: Comment.where(:post_id => 1).scoping do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end * with_exclusive_scope now should be unscoped: class Post < ActiveRecord::Base default_scope :published => true end Post.all #=> SELECT * FROM posts WHERE published = true Before: Post.with_exclusive_scope do Post.all #=> SELECT * FROM posts end After: Post.unscoped do Post.all #=> SELECT * FROM posts end Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values: Post.unscoped.all #=> SELECT * FROM posts
* with_exclusive_scope does not work properly if ARel is passed. It does work ↵Neeraj Singh2010-06-291-0/+13
| | | | | | | | nicely if hash is passed. Blow up if user is attempting it pass ARel to with_exclusive_scope. [#3838 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add missing require, Base use deprecate methodSantiago Pastorino2010-06-271-0/+1
|
* Warn that ActiveRecord::Base.reset_subclasses is gone in Rails 3 final.Jeremy Kemper2010-06-271-0/+12
|
* quotes are not necessary hereSantiago Pastorino2010-06-241-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing ↵José Valim2010-06-241-0/+1
| | | | frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
* Remove incorrect comment regarding #initialize_copyPaul Gillard2010-06-231-8/+0
| | | | | | Comment added in #3164 is incorrect after reading http://dev.rubyonrails.org/ticket/7191. Signed-off-by: José Valim <jose.valim@gmail.com>
* Don't clone associations [#4894 state:resolved]Paul Gillard2010-06-231-0/+1
| | | | | | Cloning an active record object should be shallow in that it should copy attributes but not associations. This was no longer true as a result of #3164. Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge remote branch 'rails/master'Xavier Noria2010-06-201-32/+4
|\ | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb
| * remove executable permission from files that don't need it. [#4802 ↵rohit2010-06-201-0/+0
| | | | | | | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * ActiveModel::Validations::Callbacks should not be required by default.José Valim2010-06-191-1/+0
| |
| * moving before_validation and after_validation functionality from ↵Neeraj Singh2010-06-191-0/+1
| | | | | | | | | | | | | | | | ActiveRecord to ActiveModel [#4653 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * ActiveRecord and ActionPack now use the new descendants implementation.José Valim2010-06-191-32/+4
| |
* | Adds title and basic description where needed.Rizwan Reza2010-06-151-0/+2
| |
* | Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-151-1/+1
|\ \ | |/ |/|