José Valim
e714b499cc
Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-10-20 17:52:32 -07:00
Eric Chapweske
2831996483
Fixed: #without_typecast should only disable typecasting on the duplicated attributes [ #3387 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-18 10:22:22 -05:00
Eric Chapweske
f936a1f100
Refactoring attributes/types [ #3348 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-17 12:37:15 -05:00
Joshua Peek
4cebd41d9e
Fix Rails root in sqlite adapter
2009-10-16 19:08:09 -05:00
Nick Sieger
471a394215
Modify connection pool callbacks to be compatible w/ new style
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-10-16 10:34:52 -07:00
José Valim
2d7abe245e
Renamed Orchestra to Notifications once again [ #3321 state:resolved]
2009-10-15 18:51:51 -03:00
José Valim
a15e02d44a
Unify benchmark APIs.
2009-10-15 18:19:25 -03:00
José Valim
af0d1fa892
Update Orchestra instrumentations and move part of logging to Orchestra.
2009-10-15 18:18:44 -03:00
José Valim
8b340ab2f6
Revert "Rename Orchestra to Notifications [ #3321 state:resolved]"
...
This reverts commit 8cbf825425 .
2009-10-15 18:06:15 -03:00
Jeremy Kemper
c09a5ffea7
Merge branch 'arel'
2009-10-14 19:32:09 -07:00
Joshua Peek
8cbf825425
Rename Orchestra to Notifications [ #3321 state:resolved]
2009-10-14 19:50:36 -05:00
Michael Koziarski
d5d242660c
Avoid warning spam by flipping to the new callbacks mechanism. These callbacks are actually never called by rails itself, merely there for plugins
2009-10-15 11:21:53 +13:00
Emilio Tagua
06ad817f92
Use ActiveSupport::Callbacks instead of
...
ActiveSupport::DeprecatedCallbacks.
2009-10-13 15:15:00 -03:00
Emilio Tagua
991d1bc200
Merge commit 'rails/master'
2009-10-13 15:06:43 -03:00
Joshua Peek
21e7b84621
Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks
2009-10-12 22:15:43 -05:00
Pratik Naik
68d416a58f
Add a :limit option to specify the maximum number of records that can be processed by accepts_nested_attributes_for
2009-10-09 16:08:11 +01:00
Pratik Naik
e94caf0788
Store entire options hash in the class var rather than just the reject_if proc for the nested attributes
2009-10-09 15:47:10 +01:00
Emilio Tagua
0cf4662ec5
Merge commit 'rails/master'
2009-10-08 15:05:18 -03:00
Pratik Naik
0c27d0886e
Use indifferent access attributes instead of stringifying them
2009-10-08 00:15:36 +01:00
Pratik Naik
572323135f
Allow accepts_nested_attributes_for :reject_if option accept symbols for using a method
...
Conflicts:
activerecord/lib/active_record/nested_attributes.rb
2009-10-07 23:50:30 +01:00
Emilio Tagua
9a958a3d7d
Relations: Added offset when finding with associations. Delegate array instance
...
methods to to_a.
2009-10-07 12:43:04 -03:00
Emilio Tagua
aadb09b13b
Merge commit 'rails/master'
2009-10-07 12:23:23 -03:00
Emilio Tagua
f13a7bf4e1
Don't send table_name when updating attributes, use the class arel_table.
2009-10-07 12:21:52 -03:00
Emilio Tagua
942d4b2e4f
Don't send table_name when there's no need to.
2009-10-07 12:17:51 -03:00
Emilio Tagua
1d5854826b
Allow preload and eager_load to work on relations at the same time.
2009-10-07 11:57:59 -03:00
Paul Gillard
6361d4234c
Call initialize_copy when cloning [ #3164 state:resolved]
...
Cloned AR objects are now instantiated through initialize_copy rather than
new/initialize. This allows AR classes to override initialize_copy in order to
implement deep cloning.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-06 16:25:51 -05:00
Emilio Tagua
23c168a4fd
Initial documentation to Base#all.
2009-10-05 15:27:40 -03:00
Emilio Tagua
1daceeb838
Merge branch 'associations_2'
2009-10-05 15:25:06 -03:00
Emilio Tagua
65f055a3ed
Added eager loading support to Relation and ActiveRecord#all.
2009-10-05 15:24:08 -03:00
Emilio Tagua
3747f896a1
Moved relation's test to relation_test.
2009-10-05 14:39:20 -03:00
Emilio Tagua
29457a21c0
Merge commit 'rails/master'
2009-10-02 10:52:55 -03:00
Luciano G Panaro
4168f87623
Make has_one with :conditions hash scope build or creation of the associated object with those conditions
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3088 state:committed]
2009-09-28 14:50:33 +13:00
Emilio Tagua
5f9540e483
Merge commit 'rails/master'
2009-09-22 15:08:45 -03:00
Emilio Tagua
a294d8362b
Merge commit 'rails/master'
2009-09-21 14:57:24 -03:00
José Valim
8f47f311b7
Instrument process_action, render and sql.
2009-09-20 10:56:38 -03:00
Jeremy Kemper
3fc2d1ebd9
Extract class-finder method from instantiate
2009-09-17 17:26:29 -07:00
Jeremy Kemper
7701c6f1c0
Collapse nested conditional
2009-09-17 16:15:04 -07:00
Justin Bailey
c9d3c48dc6
Enable use of MySQL stored procedures by default.
...
[#3204 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:57:03 -07:00
Emilio Tagua
24260dc0c8
Merge commit 'rails/master'
2009-09-14 09:47:55 -03:00
sdsykes
dbe9fa03df
Ruby 1.9 compat: corrected instance_methods check
...
[#3156 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-13 02:57:53 -07:00
Eloy Duran
26639e8a45
Removed the version of ActiveRecord::Base#destroyed? that was added in a44a1257d8.
...
Because José Valim was cheeky enough to already add it to the master branch.
2009-09-12 16:16:48 +02:00
Eloy Duran
a144b41cbc
Removed some superfluous conditionals from the autosave association validation methods.
...
Which are unneeded now that we only define them when needed.
2009-09-12 16:04:47 +02:00
Alexey Kovyrin
938c0ee045
Define autosave association validation methods only when needed. [ #3161 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 16:04:36 +02:00
Eloy Duran
580ec0dccd
Added some documentation about setting :autosave => false on an association.
2009-09-12 16:04:25 +02:00
Eloy Duran
65f98951ac
During autosave, ignore records that already have been destroyed. [ #2537 state:resolved]
2009-09-12 16:04:07 +02:00
Graeme Porteous
c01be9de32
Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [ #1756 state:resolved]
...
Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 16:03:32 +02:00
José Valim
3091252aba
Rename nested attributes _delete to _destroy to reflect its actual behavior and DSL (:allow_destroy). Deprecation warning added. [ #2889 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:59:32 +02:00
Dmitry Polushkin
845f62f473
Fix autosave association to skip validation if it is marked for destruction. [ #2064 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:56:01 +02:00
Eloy Duran
6cc0b9638f
Explicitely setting `autosave => false' should override new_record autosaving. [ #2214 state:resolved]
...
Original author is Jacob.
2009-09-12 15:53:15 +02:00
Lance Ivy
a44a1257d8
Don't cascade autosave validation to destroyed children. [ #2761 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:40:45 +02:00