Commit Graph

851 Commits

Author SHA1 Message Date
Pratik Naik
2a2bc8e84a Handle invalid query IN() generated when a blank array is supplied in hash conditions 2010-01-18 18:56:55 +05:30
Pratik Naik
8bb5274648 Get rid of Relation#order_clauses 2010-01-18 18:56:55 +05:30
José Valim
40c4a0036a Ensure deprecated validate methods are invoked when they are private [#3214 status:resolved] 2010-01-18 09:56:36 +01:00
Pratik Naik
d60bb0a9e4 Rename named_scope to scope 2010-01-18 04:38:19 +05:30
Pratik Naik
e1d507c7fb Dont check for class equaity when merging relations 2010-01-18 04:28:21 +05:30
Pratik Naik
88de6b2de2 Inherit named scope class Scope from Relation 2010-01-18 04:24:24 +05:30
Pratik Naik
c6850d8361 Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too. 2010-01-18 00:03:18 +05:30
Pratik Naik
f0cde5be54 Make sure named_scope names are not used as method names already 2010-01-17 21:34:41 +05:30
José Valim
c0d31ca41b save(false) is gone, use save(:validate => false) instead. 2010-01-17 14:22:34 +01:00
Pratik Naik
54a043895f Make merging of order values consistent 2010-01-17 14:19:41 +05:30
Pratik Naik
8d87c80c19 Make Relation#reload force load the records immediately 2010-01-17 04:25:59 +05:30
Pratik Naik
0ab30637dd Revert "Fix #microseconds conversion and #fast_string_to_time"
This reverts commit 717a2941e1. Bunch of failures when running postgresql tests.
2010-01-17 03:04:11 +05:30
Pratik Naik
5a52523a80 Rename active_relation_engine -> arel_engine and active_relation_table -> arel_table 2010-01-16 16:02:30 +05:30
Chris Hapgood
717a2941e1 Fix #microseconds conversion and #fast_string_to_time
* Use direct integer parsing in #fast_string_to_time to avoid convoluted
   conversions and errors due to truncation.
 * Use Float#round in #microseconds to avoid truncation errors.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-01-16 15:21:36 +13:00
Pratik Naik
43a84a054f Fix the query matching in SubscriberTest 2010-01-16 00:02:46 +05:30
Pratik Naik
bed9179aa1 Make scopes use relations under the hood 2010-01-16 00:02:46 +05:30
José Valim
363545aa20 Different nested validations should not be ignore [#3638 status:resolved] 2010-01-14 01:46:27 +01:00
José Valim
da5978c223 Add subscriber for ActionPack and move all logging inside it. 2010-01-13 01:19:23 +01:00
José Valim
8d78a82d79 Deprecate ActiveRecord::Base.colorize_logging. 2010-01-13 01:19:23 +01:00
José Valim
743cafb7f4 Create Rails::Subscriber::TestHelper and use it to make ActiveRecord subscriber tests run in both sync and async scenarios. 2010-01-13 01:19:23 +01:00
José Valim
dc2e291a93 Move AR logging responsibilities to ActiveRecord::Railties::Subscriber. 2010-01-13 01:19:23 +01:00
Chad Woolley
b9a7ec6db5 reduce max size of fixture IDs to fix sqlite2 tests, because sqlite2 was getting negative and changing values for ID field. See http://www.sqlite.org/datatypes.html
Signed-off-by: Yehuda Katz <wycats@gmail.com>
2010-01-12 11:01:49 -08:00
José Valim
cccb998800 Expose connections available in the connection pool. 2010-01-11 23:38:18 +01:00
José Valim
7e6530b170 Merge remote branch 'eloy/master' 2010-01-09 00:23:29 +01:00
José Valim
93898b389b Ensure new validates works with uniqueness validator. 2010-01-08 23:50:31 +01:00
Eloy Duran
7f775ef1a9 Renamed AssociationReflection #collection_association? to #collection?. 2010-01-08 21:47:17 +01:00
Eloy Duran
f2aacd5140 Rollback the transaction when one of the autosave associations fails to save. [#3391 state:resolved] 2010-01-08 21:45:02 +01:00
Lawrence Pit
5193fe9dd7 Exclude unchanged records from the collection being considered for autosave. [#2578 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2010-01-08 21:45:02 +01:00
Bryan Stearns
1080351437 Add failing test that triggers the stack overflow 2010-01-08 21:45:02 +01:00
José Valim
423e2acbb7 Merge remote branch 'eloy/master' 2010-01-07 20:13:07 +01:00
José Valim
b0572ab2b6 Be sure to dup load paths before clearing the array. 2010-01-07 15:31:50 +01:00
José Valim
190ce3ab37 Errors messages are now moved from :activerecord.errors to simply :errors on I18n yml files. 2010-01-07 15:31:49 +01:00
Eloy Duran
9550916903 Raise a RecordNotFound if an ID in nested attributes is given but doesn't return a record. [#2415 state:resolved] 2010-01-07 13:19:49 +01:00
Eloy Duran
b6264c43f4 Moved the validation logic to the association reflection and refactored autosave_association.rb a bit. 2010-01-07 13:19:48 +01:00
Eloy Duran
fc6aae3459 Remove deprecated '_delete' option from NestedAttributes. 2010-01-07 13:19:48 +01:00
Eloy Duran
f82adc7c5a Add AssociationReflection#collection_association? which returns true if it's for a has_many or has_and_belongs_to_many association. 2010-01-07 13:19:48 +01:00
Eloy Duran
1afa9fa5a9 Refactored nested attributes a bit around :reject_if => :all_blank. 2010-01-07 13:19:48 +01:00
José Valim
0c2d933f36 Ensure before_validation and after_validation accepts :on as option. 2010-01-06 22:24:16 +01:00
Joshua Peek
e5ed62deea Autoload AR test case 2010-01-04 16:50:01 -06:00
David Heinemeier Hansson
5e94d3e3ea Merge 2010-01-03 22:27:28 -08:00
David Heinemeier Hansson
1459c8cc1d Changed ActiveRecord::Base.store_full_sti_class to be true by default reflecting the previously announced Rails 3 default [DHH] 2010-01-03 19:30:28 -08:00
Pratik Naik
a68165833a Add Relation#create_with to explictily specify create scope 2010-01-04 03:50:16 +05:30
Pratik Naik
a115b5d79a Ensure using proper engine for Arel::Table 2010-01-04 02:05:18 +05:30
Pratik Naik
00f3f6dc31 Relation#merge and Relation#except should respect locks 2010-01-03 21:25:19 +05:30
Pratik Naik
af5e1b4cc6 Add Relation#except 2010-01-03 19:43:29 +05:30
Pratik Naik
3eca0ab838 Give preference to the second relation's order when merging 2010-01-03 18:52:30 +05:30
Pratik Naik
6f5f23aaa7 Add Relation#includes to be an equivalent of current finder option :include 2010-01-03 03:24:28 +05:30
José Valim
5fdd0e80a4 Be sure to convert namespaced names to we have 'Parrots name' instead of 'Parrots.name' in error messages. 2010-01-02 22:27:02 +01:00
José Valim
dcafe995bf Make nested attributes behave like in 2.3.5 and add a sanity test for it with I18n. 2010-01-02 22:27:02 +01:00
Pratik Naik
ac1df91e5e Implement Relation#create and Relation#create! 2010-01-03 00:16:14 +05:30