José Valim
6932f6751e
ActiveRecord should give the connection id as payload, and not the whole connection.
2010-01-15 12:24:31 +01:00
José Valim
8c8942ed4f
Move Dispatcher setup to Railties and add instrumentation hook.
2010-01-15 12:24:30 +01:00
José Valim
363545aa20
Different nested validations should not be ignore [ #3638 status:resolved]
2010-01-14 01:46:27 +01:00
José Valim
f921ad5c97
Tidy up ActiveRecord and Views runtime information on process action logger.
2010-01-14 01:07:03 +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
José Valim
7f25ccf38d
Remove allow_concurrency and verification_timeout from ActiveRecord::Base (deprecated since 2.2).
2010-01-13 01:19:23 +01:00
José Valim
1a275730b2
Set deprecation warnings for RAILS_ENV and RAILS_DEFAULT_LOGGER.
2010-01-13 01:19:22 +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
Pratik Naik
006519d2c9
Use Relation#except for reversing the order
2010-01-12 22:55:57 +05:30
Pratik Naik
4938a5746d
Ensure using proper engine for Arel::Table
2010-01-12 22:37:26 +05:30
Pratik Naik
a04486dc99
Delay building arel relation as long as possible for improved introspection
2010-01-12 22:25:55 +05:30
José Valim
cccb998800
Expose connections available in the connection pool.
2010-01-11 23:38:18 +01:00
José Valim
c1239e6509
Send the connection in AR notifications to avoid checking out new connections in threads just for logging purposes.
2010-01-11 15:14:52 +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
Jeffrey Hardy
652d1c19ea
Allow AR::Schema's migrations_path to be overwritten by subclasses. Defaults to 'db/migrate'
...
[#3671 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-08 13:08:23 -08: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
Jeremy Kemper
4300f94533
Revert "Remove connection method definition, since it's called just once."
...
Restore the connection method which was added so it can be overridden.
This reverts commit e428c75d2b .
2010-01-07 13:30:51 -08:00
José Valim
423e2acbb7
Merge remote branch 'eloy/master'
2010-01-07 20:13:07 +01:00
José Valim
a25ef06956
Allow to specify default attributes names translation in I18n yml files.
...
For example, you could easily specify :created_at and :updated_at translations as:
en:
attributes:
created_at: "Created at"
updated_at: "Updated at"
This configuration is built on ActiveModel, so it means those translations are
shared between different ORMs as well (but always as a fallback).
2010-01-07 15:31:50 +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
821a160a49
Add a deprecation message to activerecord.errors.
2010-01-07 15:31:49 +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
a559260e41
Removed unnecessary call to #try and cleaned up a bit more.
2010-01-07 13:19:48 +01:00
Eloy Duran
f866ced24a
Don't use strings for callbacks, as these will be evaled. Rather use symbols, which uses a direct method dispatch.
...
Patch by Comron Sattari. [#3429 state:resolved]
2010-01-07 13:19:48 +01:00
Eloy Duran
2171e0a1d1
Cleanup some code in nested_attributes.rb, autosave_association.rb, and associations.rb with AssociationReflection#collection_association?
...
Also cache the result value.
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
Jeffrey Hardy
caad6c634c
Restore require of 'active_record/fixtures' for Rake tasks that use them
2010-01-06 13:58:27 -05:00
Jeffrey Hardy
894ce15534
Use better defaults for fixtures: transactional=true, instantiated=false
...
These reflect the settings that were previously included in the default
test_helper.rb, removed in d7d9173 .
2010-01-06 13:38:11 -05:00
Jeffrey Hardy
891ba18d65
Update db:migrate error message to reflect the removal of config.frameworks
2010-01-06 13:37:45 -05:00
Joshua Peek
e5ed62deea
Autoload AR test case
2010-01-04 16:50:01 -06:00
Joshua Peek
2601a16ede
Autoload AS test case
2010-01-04 16:22:46 -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
José Valim
eca11bfdb5
Merge branch 'master' of git://github.com/rails/rails
2010-01-04 01:05:19 +01:00
José Valim
3990310a2b
Use underscore in notification namespaces.
2010-01-04 00:03:56 +01: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
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00