aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ensure whitespaces are stripped when merging string joins. [#1297 ↵Filip H.F. "FiXato" Slagter2009-01-281-1/+1
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add array id support to Model.update_counters. [#1254 state:resolved] ↵Pratik Naik2009-01-281-2/+17
| | | | [Carlos Júnior]
* Make sure inner scope conditions get a preference over the outer onesPratik Naik2009-01-241-2/+6
|
* Merge docrailsPratik Naik2009-01-181-48/+74
|
* Merge branch 'master' of git@github.com:rails/railsDavid Heinemeier Hansson2008-12-281-1/+47
|\
| * Inline code comments for class_eval/module_eval [#1657 state:resolved]Xavier Noria2008-12-281-1/+47
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Introduce dynamic scopes for ActiveRecord: you can now use class methods ↵Yaroslav Markin2008-12-281-1/+24
|/ | | | | | like scoped_by_user_name(user_name) and scoped_by_user_name_and_password(user_name, password) that will use the scoped method with attributes you supply. [#1648 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Refactor ActiveRecord::Base#new_record? [#1647 state:committed]Yaroslav Markin2008-12-271-1/+1
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* ActiveRecord::Base#new_record? now returns false for existing records (was ↵Yaroslav Markin2008-12-271-2/+2
| | | | | | nil) [#1219 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* ActiveRecord::QueryCache middlewareJoshua Peek2008-12-221-1/+1
|
* Ensure Model#last doesn't affects order for another finders inside the same ↵Daniel Luz2008-12-211-3/+8
| | | | | | scope [#1499 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrailsPratik Naik2008-12-191-2/+1
|
* Make exceptions raise from find_by_foo! have a more helpful message [#1567 ↵Frederick Cheung2008-12-181-1/+1
| | | | state:resolved]
* Update documentation for default_scopeDaniel Luz2008-12-161-2/+2
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Benchmark.msJeremy Kemper2008-12-091-2/+2
|
* Merge with docrailsPratik Naik2008-12-071-14/+42
|
* Add :having option to find, to use in combination with grouped finds. Also ↵miloops2008-12-011-3/+6
| | | | | | | added to has_many and has_and_belongs_to_many associations. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1028 state:committed]
* get activerecord tests passing with lazy loadingJoshua Peek2008-11-241-0/+3
|
* Autoload ActiveRecord filesJoshua Peek2008-11-241-0/+11
|
* Docfix [#1444 state:committed]David Heinemeier Hansson2008-11-231-2/+2
|
* Fix default_scope to work in combination with named scopesTom Stuart2008-11-171-1/+1
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Ensure shared default_scoping stack is duped before assigning to thread localJoshua Peek2008-11-161-1/+1
|
* Added default_scope to Base [#1381 state:committed] (Paweł Kondzior)Pratik Naik2008-11-161-1/+15
|
* Revert "Added default_scope to Base [#1381 state:committed] (Paweł ↵David Heinemeier Hansson2008-11-161-10/+0
| | | | | | Kondzior)" -- won't gel with threads. This reverts commit ff594b2bc94ff2a942fe6ca05672387722dee686.
* Added default_scope to Base [#1381 state:committed] (Paweł Kondzior)David Heinemeier Hansson2008-11-161-0/+10
|
* Moved the * strings out of construct_finder_sql to a new default_select ↵Will Bryant2008-11-151-1/+9
| | | | | | | method so it can be overridden by plugins cleanly Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1371 state:resolved]
* Fix memory leak issue in ActiveRecord scoped_methodsJoshua Peek2008-11-061-2/+1
|
* Make #destroy write 1 line into log (instead of 3) (Dmitry Sokurenko) [#689 ↵David Heinemeier Hansson2008-10-291-4/+5
| | | | status:committed]
* Fixed that serialized strings should never be type-casted (i.e. turning ↵David Heinemeier Hansson2008-10-271-1/+1
| | | | "Yes" to a boolean)(Andreas Korth) [#857 state:committed]
* Fixed issue where block is not called on the very first invocation of a ↵Ken Miller2008-10-241-2/+2
| | | | | | find_or_create_by_ automatic finder. [#1224 state:committed]
* Merge docrailsPratik Naik2008-10-161-1/+2
|
* Merge docrailsPratik Naik2008-10-051-26/+124
|
* Dynamic finders should use the ActiveRecord::Base::find method instead of ↵Eloy Duran2008-10-031-4/+4
| | | | | | | | | | | | ::find_initial, :find_last, and ::find_all. This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders. Associations for instance do go through ::find, so this makes it more consistent. Also removed the unnecessary deprecation silence blocks. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1162 state:committed]
* Allowed passing arrays-of-strings to :join everywhere. Merge duplicate join ↵Pivotal Labs2008-09-241-13/+21
| | | | | | | strings to avoid table aliasing problems. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1077 state:committed]
* Add Model#delete instance method, similar to Model.delete class method. ↵Hongli Lai (Phusion2008-09-211-0/+10
| | | | | | [#1086 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Multiparameter attributes skip time zone conversion for time-only columns ↵gbuesing2008-09-141-1/+1
| | | | [#1030 state:resolved]
* Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars ↵Manfred Stienstra2008-09-111-1/+1
| | | | | | | | | | values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1029 state:committed]
* Support :limit on update_all so that has_many with :limit can be safely updatedTarmo Tänav2008-09-101-3/+17
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Missing doc updatesDavid Heinemeier Hansson2008-09-091-1/+1
|
* Added find_last_by dynamic finder [status:committed #762]miloops2008-09-091-0/+1
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Revert "Revert "Raise UnknownAttributeError when unknown attributes are ↵Jeremy Kemper2008-09-081-1/+9
| | | | | | supplied via mass assignment"" This reverts commit 41efd73887c00ffd228b05d9346ec47a1f3759b9.
* Revert "Raise UnknownAttributeError when unknown attributes are supplied via ↵Jeremy Kemper2008-09-061-9/+1
| | | | | | mass assignment" This reverts commit 108db00aa90fe266564483ab301cf0669cae600f.
* Use a more sensible resolution on the new millisecond benchmarksDavid Heinemeier Hansson2008-09-051-1/+1
|
* Changed all benchmarking reports to be in millisecondsDavid Heinemeier Hansson2008-09-051-1/+1
|
* Merge docrailsPratik Naik2008-09-031-19/+42
|
* Some performance goodness for inheritable attributes.Clemens Kofler2008-09-031-7/+7
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Deprecate allow_concurrency and make it have no effectNick Sieger2008-08-291-19/+1
|
* Merge scoped :joins together instead of overwriting them. May expose scoping ↵Andrew White2008-08-281-10/+27
| | | | | | | | bugs in your code! [#501 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* add dynamic finder bang version to raise RecordNotFoundJosh Susser2008-08-251-1/+3
| | | | | | [#905 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* refactor dynamic finder name matching into its own classJosh Susser2008-08-251-72/+49
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>