Commit Graph

1863 Commits

Author SHA1 Message Date
Santiago Pastorino
44c46558a4 test_validates_acceptance_of_as_database_column fixed
[#3826 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-02-05 16:08:08 -08:00
Prem Sichanugrist
ea2cbc86f7 Add test case for unable to run migration if ActiveRecord::Base.logger is nil (#3434)
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-02-02 10:14:51 +01:00
Carl Lerche
9f01dff9c2 Get rails tests running on bundler 0.9 2010-01-31 19:13:43 -08:00
Joshua Peek
db49c706b6 Axe AM state machine
We're going do it eventually, get it done before 3.0 is final.
2010-01-30 18:38:01 -06:00
José Valim
d6e2f5013c Drop AR I18n deprecation and simple use errors.messages as fallback. 2010-01-30 13:12:12 +01:00
Aaron Patterson
beda2d43d6 future proofing the sqlite3 adapter code
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2010-01-26 15:09:11 -08:00
Jack Christensen
c5b652f3d2 PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns [#3777 state:resolved] 2010-01-25 20:57:07 -06:00
Pratik Naik
8ff2fb6f3a Make default_scope work with Relations 2010-01-23 13:41:09 +05:30
Pratik Naik
4afd9702fe Relation should respond to class methods 2010-01-22 20:14:37 +05:30
Pratik Naik
ee8c006dac Allow calling class methods on a Relation 2010-01-22 20:10:41 +05:30
Pratik Naik
6d30002a52 Revert "Refactoring attributes/types" [#3348 state:open]
This reverts commit f936a1f100.

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 2831996483.

Reason :

  It's not generating attribute methods properly, making object.column 5x slower.
2010-01-22 02:37:07 +05:30
José Valim
378464a2e4 Default to sync instrumentation. 2010-01-21 13:09:12 +01:00
Pratik Naik
42553a98ea Remove find_with_associations and related code from associations now that Relation handles that stuff 2010-01-20 01:20:20 +05:30
Pratik Naik
9acf0af544 Remove Relation#where_clause 2010-01-19 23:11:54 +05:30
Pratik Naik
dbce07b81d Give preference to to_a over arel from Relation#method_missing 2010-01-19 22:52:08 +05:30
Pratik Naik
b9599502c9 Add Relation#construct_relation_for_association_calculations for calculations with includes 2010-01-19 15:22:09 +05:30
Pratik Naik
9e7ec2a9f1 Simplify calculation scope building. Remove :order from associations as it is troublesome w/ calculation methods using postgresql. 2010-01-18 23:40:42 +05:30
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
dca3de3bc7 Make relations work as scopes 2010-01-17 23:22:11 +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