aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵Xavier Noria2010-04-051-1/+1
| | | | there, same for #class_eval to simplify, and adds coverage for class_eval
* Update various documentation examples to use new routing DSLAndrew White2010-04-041-1/+1
|
* Merge commit 'rails/master'Xavier Noria2010-03-311-5/+13
|\
| * Replace the placeholder base_hook API with on_load. To specify some code thatwycats2010-03-291-1/+1
| | | | | | | | | | | | | | | | should run during framework load do: ActiveSupport.on_load(:action_controller) do # Code run in the context of AC::Base end
| * Fix dom_id for ActiveRecord [#4296 state:resolved]José Valim2010-03-301-2/+1
| |
| * Rename modularized_table_name_prefix to full_table_name_prefix [#4032 ↵wycats2010-03-281-2/+2
| | | | | | | | state:resolved]
| * Add the ability to specify table_name_prefix on individual modulesAndrew White2010-03-281-1/+8
| | | | | | | | Signed-off-by: wycats <wycats@gmail.com>
| * Update example of default_scope to use the new arel finder syntaxDavid Heinemeier Hansson2010-03-281-1/+1
| |
| * adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
| |
| * adds missing requires for Object#duplicable?Xavier Noria2010-03-281-0/+1
| |
* | Changes migration number to version due to ambiguity. [#3065 state:committed]Rizwan Reza2010-03-281-1/+1
|/
* Remove unused attributes_with_quotes method.Emilio Tagua2010-03-251-20/+0
|
* Move require closer to homeJeremy Kemper2010-03-171-1/+0
|
* fixing activerecord tests [#4205 state:resolved]Aaron Patterson2010-03-171-0/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* clean up more warnings, remove unnecessary methods, fix eval line numbers. ↵Aaron Patterson2010-03-161-0/+4
| | | | | | [#4193 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* cleaning up many more warnings in activerecord [#4180 state:resolved]Aaron Patterson2010-03-151-2/+8
| | | | Signed-off-by: wycats <wycats@gmail.com>
* speeding up clone_attributes, changing readonly to be initialized in def ↵Aaron Patterson2010-03-141-8/+9
| | | | | | initialize Signed-off-by: wycats <wycats@gmail.com>
* cleaning up some test warningsAaron Patterson2010-03-141-0/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-165/+5
| | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
* converting inject to each and mapAaron Patterson2010-03-061-5/+4
| | | | | | [#4119 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* fixed a 'RecordNotFound' bug when calling 'reload' on a object which doesn't ↵Tobias Bielohlawek2010-02-261-1/+1
| | | | | | | | met the default_scope conditions, added test [#3166 status:resolved] The reload method didn't made use of 'with_exclusive_scope' when reloading the object. This lead to a RecordNotFound exception, in case the object doesn't met the default_scope condition (anymore) - which is obviously a bug. This quick fix makes use of with_exclusive_scope in the reload method as well. See test for full example. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix a bug where default_scope was overriding attributes given on model ↵Henry Hsu2010-02-261-1/+1
| | | | | | initialization [#3218 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice.Jeremy Kemper2010-02-251-1/+1
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-4/+9
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Rename Rails::Subscriber to Rails::LogSubscriberPrem Sichanugrist2010-02-161-1/+1
|
* Move batch finders to RelationPratik Naik2010-02-121-1/+2
|
* removing , from ,= statement in WrappedDatabaseException constructorSubbaRao Pasupuleti2010-02-031-1/+1
| | | | | | [#3830 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make default_scope work with RelationsPratik Naik2010-01-231-2/+3
|
* Revert "Refactoring attributes/types" [#3348 state:open]Pratik Naik2010-01-221-6/+31
| | | | | | | | | | | | | | | | | This reverts commit f936a1f100e75082081e782e5cceb272885c2df7. Conflicts: activerecord/lib/active_record.rb activerecord/lib/active_record/base.rb Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open] This reverts commit 2831996483c6a045f1f38d8030256eb58d9771c3. Reason : It's not generating attribute methods properly, making object.column 5x slower.
* Cache quoted_table_namePratik Naik2010-01-211-4/+5
|
* Move update and update_all to RelationPratik Naik2010-01-201-70/+1
|
* Base.merge_conditions is no longer neededPratik Naik2010-01-201-14/+0
|
* Dont delegate Relation#update to arelPratik Naik2010-01-201-2/+2
|
* Delegate delete_all to RelationPratik Naik2010-01-201-22/+1
|
* Move destroy to RelationPratik Naik2010-01-201-28/+1
|
* Remove Base.delete as it's same as Relation#deletePratik Naik2010-01-201-25/+1
|
* Delegate exists? to RelationPratik Naik2010-01-201-35/+1
|
* Make Relation#destroy_all handle all the casesPratik Naik2010-01-201-31/+1
|
* Move array_of_strings? to RelationPratik Naik2010-01-201-4/+0
|
* Remove stale methods constructing joinsPratik Naik2010-01-201-28/+0
|
* Delegate all finders to RelationPratik Naik2010-01-201-115/+1
|
* with_scope no longer needs :reverse_mergePratik Naik2010-01-201-13/+2
|
* Rename CalculationMethods to Calculations and get rid of the old ↵Pratik Naik2010-01-191-1/+2
| | | | Calculations module
* save(false) is gone, use save(:validate => false) instead.José Valim2010-01-171-5/+5
|
* Merge docrailsPratik Naik2010-01-171-2/+2
|
* Cache Model.arel_tablePratik Naik2010-01-171-3/+3
|
* Use arel_table[] instead of unscoped[] to get arel attributePratik Naik2010-01-171-3/+3
|
* Rename Model.active_relation to Model.unscopedPratik Naik2010-01-171-12/+12
|
* Get rid of Base#merge_includesPratik Naik2010-01-161-5/+0
|
* No need to set @arel_engine to nil twice. Committed by mistake in 3968825fPratik Naik2010-01-161-1/+1
|