- 18 1月, 2013 1 次提交
-
-
由 robertomiranda 提交于
-
- 29 11月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Jason Rush 提交于
Allows you to do BaseClass.new(:type => "SubClass") as well as parent.children.build(:type => "SubClass") or parent.build_child to initialize an STI subclass. Ensures that the class name is a valid class and that it is in the ancestors of the super class that the association is expecting.
-
- 10 11月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 17 9月, 2012 2 次提交
-
-
由 Guillermo Iguaran 提交于
-
由 Guillermo Iguaran 提交于
-
- 11 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
It's not really a good idea to have this as a global config option. We should allow people to specify the behaviour per association. There will now be two new values: * :dependent => :restrict_with_exception implements the current behaviour of :restrict. :restrict itself is deprecated in favour of :restrict_with_exception. * :dependent => :restrict_with_error implements the new behaviour - it adds an error to the owner if there are dependent records present See #4727 for the original discussion of this.
-
- 08 8月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 02 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 28 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
-
- 27 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
-
- 27 4月, 2012 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 06 3月, 2012 1 次提交
-
-
由 Jean Boussier 提交于
-
- 02 2月, 2012 3 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Manoj 提交于
-
- 01 2月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 31 1月, 2012 1 次提交
-
-
由 Manoj 提交于
-
- 29 1月, 2012 1 次提交
-
-
由 Manoj 提交于
-
- 05 7月, 2011 1 次提交
-
-
由 Dieter Komendera 提交于
-
- 01 7月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Assign the association attributes to the associated record before the before_initialize callback of the record runs. Fixes #1842.
-
- 07 6月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
-
- 25 5月, 2011 1 次提交
-
-
由 Josh Kalderimis 提交于
-
- 18 5月, 2011 2 次提交
-
-
由 Andrew White 提交于
-
由 Andrew White 提交于
The build_association method was added as an API for plugins to hook into in 1398db01. This commit restores this API and the ability to override class.new to return a subclass based on a virtual attribute in the attributes hash.
-
- 13 5月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Don't use mass-assignment protection when setting foreign keys or association conditions on singular associations. Fixes #481 (again).
-
- 11 5月, 2011 2 次提交
-
-
由 Andrew White 提交于
-
由 Jon Leighton 提交于
-
- 13 4月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Deprecated support for passing hashes and relations to default_scope, in favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
-
- 18 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Split AssociationProxy into an Association class (and subclasses) which manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
-
- 14 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add interpolation of association conditions back in, in the form of proc { ... } rather than instance_eval-ing strings
-
- 30 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
We shouldn't be using scoped.scoping { ... } to build associated records, as this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved]
-
- 12 1月, 2011 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
When assigning a has_one, if the existing record fails to be removed from the association, raise an error
-