aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* forcing encoding on 1.9 when dealing with "binary" columns [#4612 ↵Aaron Patterson2010-06-081-0/+4
| | | | | | state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Fix multiple self-referencing eager loads failing to join multiple timesErnie Miller2010-06-081-2/+2
| | | | | | [#4679 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge remote branch 'rsim/oracle_enhanced_rails3'wycats2010-06-072-3/+7
|\
| * ignore raw_sql_ table alias that is used by Oracle adapterRaimonds Simanovskis2010-06-041-1/+2
| |
| * Downcase quoted table name in regex in count_aliases_from_table_joinsRaimonds Simanovskis2010-06-041-1/+2
| | | | | | | | Oracle adapter's quote_table_name returns quoted table name in uppercase and therefore it should be downcased before scanning downcased join_sql
| * downcase table names in aliased_table_name_for and ↵Raimonds Simanovskis2010-06-041-2/+4
| | | | | | | | references_eager_loaded_tables? methods (as Oracle quoted table names are in uppercase)
* | Make the logic for nested_records_changed_for_autosave? simpler.José Valim2010-06-071-9/+5
| | | | | | | | [#4648 state:resolved]
* | Fixing test class names and refactor line in autosave associationCarlos Antonio da Silva2010-06-071-1/+1
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* | Require active support/string/conversions so constantize can be used in ↵Tom Meier2010-06-071-0/+1
| | | | | | | | | | | | associations.rb Signed-off-by: José Valim <jose.valim@gmail.com>
* | MySQL: require 2.7 or later so we can rely on result.each_hashJeremy Kemper2010-06-051-49/+8
| |
* | Whoops. _run_*_callbacks is privatewycats2010-06-041-1/+1
| |
* | Use faster form of running callbackswycats2010-06-041-1/+1
|/
* Properly cache association_collection#scopes calls having argumentsPratik Naik2010-06-041-1/+2
|
* Special treatement for Relation#select { with block }Pratik Naik2010-06-021-1/+14
|
* Configure generators before invoking.José Valim2010-06-021-0/+1
|
* fix `reset_counters` to work even with complex class namesMislav Marohnić2010-05-241-4/+6
| | | | | | e.g. it guesses that a belongs_to association to Namespace::MyModel is named "my_model", unlike before where it would look up an association named "namespace::mymodel" and fail.
* cleanup `update/reset_counters`: less SQL strings, more ActiveRecord/ArelMislav Marohnić2010-05-241-12/+8
|
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-203-4/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge remote branch 'rails/master'Xavier Noria2010-05-199-28/+143
|\
| * Revert "Don't carry default value when changing column for a binary type on ↵Jeremy Kemper2010-05-181-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL" Broke mysql tests. This reverts commit edec1afe25014749f0e2df86d27477b45586a9e3. Conflicts: activerecord/test/cases/migration_test.rb [#3234 state:open]
| * make add_index and remove_index more resilient; new rename_index method; ↵Étienne Barrié2010-05-185-11/+106
| | | | | | | | | | | | | | | | track database limits [#3452 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Nested records (re: autosave) are now updated even when the intermediate ↵Ian White2010-05-181-1/+22
| | | | | | | | | | | | parent record is unchanged [#4242 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Remove Model.clear_default_scopePratik Naik2010-05-181-4/+0
| |
| * Cut the fat and make session stores rely on request.cookie_jar and change ↵José Valim2010-05-181-1/+1
| | | | | | | | set_session semantics to return the cookie value instead of a boolean.
| * AR::Base#clone fixed to set dirty bits for cloned objectpleax2010-05-161-1/+7
| | | | | | | | | | | | [#2919 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * cache connection when quotingComron Sattari2010-05-161-5/+6
| | | | | | | | | | | | | | [#3642 state:committed] Signed-off-by: Marius Nuennerich <marius@nuenneri.ch> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge branch 'master' of git://github.com/rails/railsRizwan Reza2010-05-1716-87/+123
|\|
| * a cloned object no longer mimics changed flags from creator , plus a test ↵Federico Brubacher2010-05-161-0/+1
| | | | | | | | | | | | case [#4614 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * prevent to run fixture accessor (e.g. test_foos for TestFoo model) as a test ↵Nobuhiro IMAI2010-05-161-0/+1
| | | | | | | | | | | | | | case [#2992 state:resolved] Signed-off-by: Wijnand Wiersma <wijnand@videre.net> Signed-off-by: José Valim <jose.valim@gmail.com>
| * Don't carry default value when changing column for a binary type on MySQL ↵Elomar França2010-05-161-1/+5
| | | | | | | | | | | | [#3234 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an ↵José Valim2010-05-152-2/+2
| | | | | | | | | | | | | | | | options hash and make various Validators pass their (filtered) options." Having a huge array to whitelist options is not the proper way to handle this case. This means that the ActiveModel::Errors object should know about the options given in *all* validators and break the extensibility added by the validators itself. If the intent is to whitelist options before sending them to I18n, each validator should clean its respective options instead of throwing the responsibility to the Errors object. This reverts commit bc1c8d58ec45593acba614d1d0fecb49adef08ff.
| * Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-05-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hash and make various Validators pass their (filtered) options. This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format". Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation. Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options). Original patch by Sven Fuchs, some minor changes and has been changed to be applicable to master again [#4057 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Reset quoted_table_name after set_table_name [#4568 state:resolved]Santiago Pastorino2010-05-151-1/+1
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Fix for get_ids when including a belongs_to association on a has_many ↵Diego Algorta2010-05-151-1/+1
| | | | | | | | | | | | association [#2896 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Reorganized initializers a bit to enable better hooks for common cases ↵wycats2010-05-151-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without the need for Railtie. Specifically, the following hooks were added: * before_configuration: this hook is run immediately after the Application class comes into existence, but before the user has added any configuration. This is the appropriate place to set configuration for your plugin * before_initialize: This is run after all of the user's configuration has completed, but before any initializers have begun (in other words, it runs right after config/environments/{development,production,test}.rb) * after_initialize: This is run after all of the initializers have run. It is an appropriate place for forking in a preforking setup Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
| * STI should not ignore type condition while applying scopes from parent class ↵Neeraj Singh2010-05-151-5/+1
| | | | | | | | | | | | | | | | scopes [#4507 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Modified default_scope to merge with any pre-existing default_scopeDavid Chelimsky + Brian Tatnall2010-05-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | and added AR::Base::clear_default_scope - clear_default_scope provides users who rely on the old behaviour of each call to default_scope overwriting any previous default scopes an opportunity to maintain that behaviour. [#4583 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Better code formatting and proper line numbers for stack tracesNeeraj Singh2010-05-142-17/+17
| | | | | | | | | | | | [#4596 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * To allow proper fisting of stack traceSantiago Pastorino2010-05-141-3/+3
| | | | | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * revises the rdoc of #average according to 5f3bd55, and realigns when clausesXavier Noria2010-05-121-5/+4
| |
| * type_cast_calculated_value refactor: value is never a Fixnum here. Fix test ↵Santiago Pastorino2010-05-111-1/+1
| | | | | | | | | | | | | | | | since SQLite returns Float. [#4514 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Make sure timestamp is properly referencedBlake Smith2010-05-111-1/+1
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
| * Remove undocumented save_without_validation!Pratik Naik2010-05-111-4/+0
| |
| * Use arel instead of sql stringsPratik Naik2010-05-111-6/+5
| |
| * Succint save definitionPratik Naik2010-05-111-4/+2
| |
| * Make sure valid? preceives the context as in ActiveModel API (ht: Carlos ↵José Valim2010-05-102-26/+23
| | | | | | | | Antonio)
| * Make sure schema dumper doesnt throw up when there are no index lengthsPratik Naik2010-05-091-1/+3
| |
| * Revert "Revert "Add index length support for MySQL [#1852 state:open]""Pratik Naik2010-05-094-3/+38
| | | | | | | | This reverts commit 6626833db13a69786f9f6cd56b9f53c4017c3e39.
| * Improve code from 231d7676f72947bae765b9bd885b134aaf949921Pratik Naik2010-05-091-7/+5
| |
| * corrected AR find_each and find_in_batches to raise when the user uses ↵Josh Kalderimis2010-05-091-1/+8
| | | | | | | | | | | | select but does not specify the primary key Signed-off-by: José Valim <jose.valim@gmail.com>