aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* coerce blank strings to nil values for boolean and integer fieldsJosh Susser2008-08-221-5/+8
| | | | [#860 state:resolved]
* Merge commit 'sven/i18n' into i18nJeremy Kemper2008-08-221-3/+38
|\
| * Merge branch 'master' into i18nSven Fuchs2008-08-211-8/+20
| |\
| * | Added Base.human_name methodIain Hecker2008-08-201-0/+13
| | |
| * | Cleaned up ActiveRecord i18n scopingIain Hecker2008-08-141-4/+26
| | |
* | | Revert "Performance: freeze cached rows instead of duping"Jeremy Kemper2008-08-211-1/+1
| | | | | | | | | | | | This reverts commit cd8e653d5b18e6d3c3acc9930832f8e23945e392.
* | | Revert "coerce blank strings to nil values for boolean and integer fields"Jeremy Kemper2008-08-211-8/+5
| | | | | | | | | | | | | | | | | | This reverts commit aee14630d4dc0856e597794cc731fac68c2d2e34. [#860 state:incomplete]
* | | coerce blank strings to nil values for boolean and integer fieldsJosh Susser2008-08-211-5/+8
| |/ |/| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* | Fix generated WHERE IN query for named scopes. [#583 state:resolved]Philip Hallstrom2008-08-211-1/+1
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Performance: freeze cached rows instead of dupingJeremy Kemper2008-08-181-1/+1
| |
* | Fixed STI type condition for eager loading of associationsTarmo Tänav2008-08-161-3/+4
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Fixed Time/Date object serializationTarmo Tänav2008-08-121-2/+9
| | | | | | | | | | Time/Date objects used to be converted to_s instead of to_uaml which made them unserializable.
* | move logging of protected attribute removal into ↵Trevor Turk2008-08-121-1/+5
|/ | | | | | | log_protected_attribute_removal method Signed-off-by: Michael Koziarski <michael@koziarski.com> [#804 status:committed]
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Raise UnknownAttributeError when unknown attributes are supplied via mass ↵Pratik Naik2008-07-311-1/+9
| | | | assignment
* Merge docrails changesPratik Naik2008-07-281-2/+27
|
* Set config.active_record.timestamped_migrations = false to have migrations ↵Nik Wakelin2008-07-171-0/+4
| | | | | | with numeric prefix instead of UTC timestamp. [#446 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge with docrails.Pratik Naik2008-07-161-5/+4
|
* update_counters should update nil values.miloops2008-07-151-1/+1
| | | | | | This allows counter columns with default null instead of requiring default 0. [#493 state:resolved]
* Allow conditions on multiple tables to be specified using hash.Pratik Naik2008-06-281-9/+15
| | | | | | | | | Examples: User.all :joins => :items, :conditions => { :age => 10, :items => { :color => 'black' } } Item.first :conditions => { :items => { :color => 'red' } } Note : Hash key in :conditions is referring to the actual table name or the alias defined in query.
* Include cache key in ModelNameJeremy Kemper2008-06-241-4/+4
|
* Fix column collision with named_scope and :joins. [#46 state:resolved]Mark Catley2008-06-221-1/+1
|
* Named bind variables can now be used with postgresql-style typecastsTarmo Tänav2008-06-221-3/+4
| | | | | For example :conditions => ['stringcol::integer = :var', { :var => 10 }] will no longer raise an exception about ':integer' having a missing value.
* Make Base.merge_conditions publicJeremy Kemper2008-06-171-14/+14
|
* Silence scope resolution warningsJeremy Kemper2008-06-111-4/+6
|
* Simplify ActiveRecord::Base#update_attributePratik Naik2008-06-071-4/+4
|
* Generate less garbage when expanding range bind variables in conditionsJeremy Kemper2008-06-061-3/+8
|
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-1/+1
| | | | ActiveSupport [#238 state:resolved]
* Add ActiveRecord::Base.sti_name that checks ↵rick2008-05-311-4/+12
| | | | ActiveRecord::Base#store_full_sti_class? and returns either the full or demodulized name. [rick] [#114 state:resolved]
* Ensure :select passed in options overrides the one from the scope. [#239 ↵Andrew White2008-05-291-1/+1
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrails.Pratik Naik2008-05-251-101/+113
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Prefer string core_ext inflector methods over directly accessing Inflector.Joshua Peek2008-05-141-22/+22
|
* Add ActiveRecord option to store the full class name on STI's type column, ↵Rodrigo Kochenburger2008-05-131-3/+7
| | | | | | allowing one to have STI subclasses in different namespaces [#114] Signed-off-by: rick <technoweenie@gmail.com>
* Remove AR::Base#attributes argument. [#52 state:resolved]Frederick Cheung2008-05-121-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix blank conditions on AssociationCollection#find. [#104 state:resolved]Jonathan Viney2008-05-111-0/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrails:Pratik Naik2008-05-091-69/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e6afd8b2736364322b673bbdcca3e9b38b6d3da0 Author: Xavier Noria <fxn@hashref.com> Date: Thu May 8 23:49:36 2008 +0200 Overall documentation improvement and markup corrections. Zillion changes. commit 2fead68b3192332eee27945ed95a94a64ca73f70 Author: Austin Putman <austin@emmanuel.local> Date: Wed May 7 19:35:46 2008 -0700 Documented class methods on ActionController::Routing. These are dangerous, and mostly used for testing. commit f5b84182dbc39bea79c8ee319c688d00fa99f9d1 Author: Teflon Ted <github@rudiment.net> Date: Wed May 7 16:08:49 2008 -0400 Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications. commit 370f4f51722cec49ace17093d29e9ce9e8f15cfb Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 14:00:59 2008 +0200 Applied list conventions in AR::Base commit 5bd18429f09d44e75191bec42a6db04bd33f3030 Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 13:53:35 2008 +0200 Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base commit d912bd5672316454457ae83f6e9dda5197beeb6f Author: Yaroslav Markin <yaroslav@markin.net> Date: Wed May 7 13:50:28 2008 +0400 Add a filter_parameter_logging usage hint to generated ApplicationController. This may help to remind the developer to filter sensitive information from application logs. Closes #11578 commit b243de0db3c2605121e055079854af5090d06374 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:39:47 2008 -0700 doc: disambiguating an example ActiveRecord class commit f81d771f0657ae8375b84a77a059812cce5d6fd9 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:35:05 2008 -0700 doc: ActiveRecord::Reflection::AssociationReflection#through_reflection Added documentation demonstrating the use of #through_reflection for finding intervening reflection objects for HasManyThrough and HasOneThrough. commit ae6b46f00b5b8b2939c6b37ce3329c83de7e71db Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:47:41 2008 +0800 Document AttributeAssignmentError and MultiparameterAssignmentErrors. commit 8f463550b597db2156b67733f31aed13487fbc3a Author: John Barnette <jbarnette@gmail.com> Date: Tue May 6 22:46:44 2008 -0700 Killing/fixing a bunch of outdated language in the AR README. commit aca44bcd92ef783abdf484b58abdde6786db0f89 Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:34:52 2008 +0800 Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout. commit 284a930a93fbee16e25d06392779dbf2f03e9e12 Author: Jonathan Dance <jd@wuputah.com> Date: Tue May 6 14:58:26 2008 -0400 improvements to the page caching docs commit 9482da621390c874da7c921c8bd6230caae7035a Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 18:13:40 2008 +0200 validates_numericality_of() "integer" option really is "only_integer" commit e9afd6790a8f530528f6597a7f59bb283be754f6 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:11:59 2008 +0200 Harmonized hash notation in AR::Base commit 67ebf14a91ffd970b582be4ff2991d691a9cf3e1 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:06:19 2008 +0200 Turned options into rdoc-lists in AR::Base commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 Author: Marshall Huss <mwhuss@Macbook.local> Date: Sun May 4 23:21:33 2008 -0400 Added information of how to set element_name in the case the user has a name confliction with an existing model Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Base#instantiate_time_object: eliminate check for Time.zone, since we can ↵gbuesing2008-05-081-1/+1
| | | | assume this is set if time_zone_aware_attributes is set to true
* Added AbstractAdapter#table_exists? and made AbstractAdapter#table ↵Tarmo Tänav2008-05-071-12/+1
| | | | | | implementation non-optional Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Improve documentation coverage and markupXavier Noria2008-05-021-36/+32
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Added block-setting of attributes for Base.create like Base.new already has ↵David Heinemeier Hansson2008-04-301-2/+14
| | | | (Adam Meehan) [#39 state:resolved]
* Note that allow_concurrency = true means you need to ↵Jeremy Kemper2008-04-281-1/+3
| | | | verify_active_connections! to clear out connections assigned to stale threads.
* Let Base.all use conditions etc like first/lastDavid Heinemeier Hansson2008-04-281-0/+6
|
* Remove old :limit removal code from find_initial, logic is now handled in ↵Aliaksey Kandratsenka2008-04-271-1/+1
| | | | | | the preloading and eager loading code. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Ensure that respond_to? considers dynamic finder methods. Closes #11538. ↵Pratik Naik2008-04-061-2/+17
| | | | | | [floehopper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-04-051-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Partial updates include only unsaved attributes. Off by default; set ↵Jeremy Kemper2008-03-311-4/+4
| | | | | | YourClass.partial_updates = true to enable. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switched to UTC-timebased version numbers for migrations and the schema. ↵David Heinemeier Hansson2008-03-281-1/+1
| | | | | | This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches (closes #11458) [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Typo fix in documentation from [9090] References #11422Michael Koziarski2008-03-261-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de