- 11 8月, 2012 4 次提交
-
-
由 Jon Leighton 提交于
Well, not all of them, but some of them. I don't think there's much reason for these methods to be private.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
We don't need the complexity of to_sentence, and it shouldn't be a bang method.
-
由 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.
-
- 01 8月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
Move the logic for validation check to the same method, and cache dependent option in a variable to reuse inside the dependency configuration methods instead of relying on the options hash.
-
由 Hrvoje Šimić 提交于
-
- 20 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
This fixes active_record_deprecated_finders.
-
- 14 7月, 2012 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 13 7月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 02 2月, 2012 3 次提交
-
-
由 Paco Guzman 提交于
-
由 Rafael Mendonça França 提交于
-
由 Manoj 提交于
-
- 01 2月, 2012 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Arun Agrawal 提交于
-
- 31 1月, 2012 2 次提交
-
-
由 Manoj 提交于
-
由 Paco Guzman 提交于
-
- 29 1月, 2012 1 次提交
-
-
由 Manoj 提交于
-
- 17 1月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
See the CHANGELOG for details. Fixes #950.
-
由 Jon Leighton 提交于
This reverts commit c99d507f.
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 28 11月, 2011 2 次提交
-
-
由 Josh Susser 提交于
This change uses Module.redefine_method as defined in ActiveSupport. Making Module.define_method public would be as clean in the code, and would also emit warnings when redefining an association. That is pretty messy given current tests, so I'm leaving it for someone else to decide what approach is better.
-
由 Josh Susser 提交于
-
- 16 11月, 2011 1 次提交
-
-
由 Josh Susser 提交于
Instead of generating association methods directly in the model class, they are generated in an anonymous module which is then included in the model class. There is one such module for each association. The only subtlety is that the generated_attributes_methods module (from ActiveModel) must be forced to be included before association methods are created so that attribute methods will not shadow association methods.
-
- 22 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Use proper objects to do the work to build the associations (adding methods, callbacks etc) rather than calling a whole bunch of methods with rather long names.
-