Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Ensure that associations have a symbol argument. | Steve Klabnik | 2012-11-28 | 1 | -0/+2 |
| | | | | Fixes #7418. | ||||
* | Use method compilation for association methods | Jon Leighton | 2012-08-10 | 1 | -12/+15 |
| | | | | | | | | | Method compilation provides better performance and I think the code comes out cleaner as well. A knock on effect is that methods that get redefined produce warnings. I think this is a good thing. I had to deal with a bunch of warnings coming from our tests, though. | ||||
* | DRY up handling of dependent option | Jon Leighton | 2012-08-10 | 1 | -3/+15 |
| | |||||
* | Unprivatise all the things | Jon Leighton | 2012-08-10 | 1 | -28/+26 |
| | | | | | | Well, not all of them, but some of them. I don't think there's much reason for these methods to be private. | ||||
* | move dependency logic out of generated methods | Jon Leighton | 2012-08-10 | 1 | -24/+0 |
| | |||||
* | Clean up dependent option validation. | Jon Leighton | 2012-08-10 | 1 | -8/+4 |
| | | | | | We don't need the complexity of to_sentence, and it shouldn't be a bang method. | ||||
* | Remove the dependent_restrict_raises option. | Jon Leighton | 2012-08-10 | 1 | -19/+19 |
| | | | | | | | | | | | | | | | 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. | ||||
* | Refactor dependency check validation | Carlos Antonio da Silva | 2012-08-01 | 1 | -10/+7 |
| | | | | | | 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. | ||||
* | move method for dependent option check | Hrvoje Šimić | 2012-08-01 | 1 | -0/+13 |
| | |||||
* | Avoid options ever being nil | Jon Leighton | 2012-07-20 | 1 | -4/+4 |
| | | | | This fixes active_record_deprecated_finders. | ||||
* | fix association :extend option | Jon Leighton | 2012-07-13 | 1 | -0/+5 |
| | |||||
* | move the deprecated options into active_record_deprecated_finders | Jon Leighton | 2012-07-13 | 1 | -1/+1 |
| | |||||
* | stop using class_attribute where methods/inheritance will suffice. | Jon Leighton | 2012-07-13 | 1 | -7/+18 |
| | |||||
* | extract deprecated association options to active_record_deprecated_finders | Jon Leighton | 2012-07-13 | 1 | -43/+0 |
| | |||||
* | Represent association scope options as AR::Relations insternally. | Jon Leighton | 2012-07-13 | 1 | -0/+43 |
| | |||||
* | Allow associations to take a lambda which builds the scope | Jon Leighton | 2012-07-13 | 1 | -6/+15 |
| | |||||
* | Refactor define_restrict_dependency_method using reflection | Paco Guzman | 2012-02-01 | 1 | -3/+3 |
| | |||||
* | Use human attribute name to show the dependent destroy message | Rafael Mendonça França | 2012-02-01 | 1 | -1/+2 |
| | |||||
* | fix has_one, has_many restrict error message | Manoj | 2012-02-01 | 1 | -1/+2 |
| | |||||
* | Merge pull request #4799 from arunagw/warning_fixed_for_indentations | Aaron Patterson | 2012-01-31 | 1 | -1/+1 |
|\ | | | | | warning removed: mismatched indentations | ||||
| * | warning removed: mismatched indentations | Arun Agrawal | 2012-01-31 | 1 | -1/+1 |
| | | |||||
* | | Put spaces between the words at deprecation warning | Rafael Mendonça França | 2012-01-31 | 1 | -3/+3 |
|/ | |||||
* | suggested fixes for :dependent => :restrict deprecation. | Manoj | 2012-01-31 | 1 | -1/+1 |
| | |||||
* | Same method for has_many and has_one associations | Paco Guzman | 2012-01-31 | 1 | -0/+15 |
| | |||||
* | has_many/has_one, :dependent => :restrict, deprecation added. | Manoj | 2012-01-29 | 1 | -1/+15 |
| | |||||
* | Deprecate inferred JOINs with includes + SQL snippets. | Jon Leighton | 2012-01-16 | 1 | -1/+1 |
| | | | | | | See the CHANGELOG for details. Fixes #950. | ||||
* | Revert "Deprecate implicit eager loading. Closes #950." | Jon Leighton | 2012-01-16 | 1 | -1/+1 |
| | | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9. | ||||
* | Deprecate implicit eager loading. Closes #950. | Jon Leighton | 2011-12-29 | 1 | -1/+1 |
| | |||||
* | avoid warnings | Josh Susser | 2011-11-27 | 1 | -2/+2 |
| | | | | | | | 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. | ||||
* | use GeneratedFeatureMethods module for associations | Josh Susser | 2011-11-27 | 1 | -3/+5 |
| | |||||
* | association methods are now generated in modules | Josh Susser | 2011-11-15 | 1 | -5/+5 |
| | | | | | | | | | | 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. | ||||
* | Use proper objects to do the work to build the associations (adding methods, ↵ | Jon Leighton | 2011-02-21 | 1 | -0/+53 |
callbacks etc) rather than calling a whole bunch of methods with rather long names. |