aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/builder/association.rb
Commit message (Collapse)AuthorAgeFilesLines
* push more mutations outside the factory methodAaron Patterson2013-08-011-0/+4
|
* push more mutations out of the builderAaron Patterson2013-08-011-8/+9
| | | | | `configure_dependency` actually defined callbacks, so rename the method and move it to the appropriate method.
* remove dependency on @model when defining callbacksAaron Patterson2013-08-011-3/+3
|
* extract more mutations to the callerAaron Patterson2013-08-011-6/+10
|
* separate some mutations from reflection constructionAaron Patterson2013-08-011-5/+1
|
* pass the mixin in to the code generation methodsAaron Patterson2013-07-311-6/+6
|
* we should not allow invalid objects to be constructedAaron Patterson2013-07-311-1/+2
|
* push some validation up to the factory methodAaron Patterson2013-07-311-4/+5
|
* Refactor to use flat_mapCarlos Antonio da Silva2013-07-231-3/+3
|
* AR::Base does not need to know how to create reflection objectsAaron Patterson2013-07-221-1/+1
|
* remove unnecessary readerAaron Patterson2013-07-221-4/+4
|
* only flatten one sideAaron Patterson2013-07-221-1/+1
|
* extend by adding relationships rather than monkey patchingAaron Patterson2013-07-221-5/+7
|
* decouple extensions from association object stateAaron Patterson2013-07-221-2/+2
|
* Dropped deprecated option `:restrict` for `:dependent` in associationsNeeraj Singh2013-07-031-7/+0
|
* remove evals from the associationAaron Patterson2013-06-111-8/+2
|
* reduce evals in depdendent associationsAaron Patterson2013-06-111-1/+2
|
* copy edits[ci skip]Vijay Dev2013-05-191-11/+8
|
* Added some more documentation for define_readers and define_writer of the ↵aditya-kapoor2013-05-151-0/+7
| | | | Association and its inherited classes
* Added some more documentation for ↵aditya-kapoor2013-05-151-0/+11
| | | | ActiveRecord::Associations::Builder::Association class
* Added documentation for ActiveRecord::Associations::Builder::Association classaditya-kapoor2013-05-151-0/+4
|
* Ensure that associations have a symbol argument.Steve Klabnik2012-11-281-0/+2
| | | | Fixes #7418.
* Use method compilation for association methodsJon Leighton2012-08-101-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 optionJon Leighton2012-08-101-3/+15
|
* Unprivatise all the thingsJon Leighton2012-08-101-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 methodsJon Leighton2012-08-101-24/+0
|
* Clean up dependent option validation.Jon Leighton2012-08-101-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 Leighton2012-08-101-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 validationCarlos Antonio da Silva2012-08-011-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 checkHrvoje Šimić2012-08-011-0/+13
|
* Avoid options ever being nilJon Leighton2012-07-201-4/+4
| | | | This fixes active_record_deprecated_finders.
* fix association :extend optionJon Leighton2012-07-131-0/+5
|
* move the deprecated options into active_record_deprecated_findersJon Leighton2012-07-131-1/+1
|
* stop using class_attribute where methods/inheritance will suffice.Jon Leighton2012-07-131-7/+18
|
* extract deprecated association options to active_record_deprecated_findersJon Leighton2012-07-131-43/+0
|
* Represent association scope options as AR::Relations insternally.Jon Leighton2012-07-131-0/+43
|
* Allow associations to take a lambda which builds the scopeJon Leighton2012-07-131-6/+15
|
* Refactor define_restrict_dependency_method using reflectionPaco Guzman2012-02-011-3/+3
|
* Use human attribute name to show the dependent destroy messageRafael Mendonça França2012-02-011-1/+2
|
* fix has_one, has_many restrict error messageManoj2012-02-011-1/+2
|
* Merge pull request #4799 from arunagw/warning_fixed_for_indentationsAaron Patterson2012-01-311-1/+1
|\ | | | | warning removed: mismatched indentations
| * warning removed: mismatched indentationsArun Agrawal2012-01-311-1/+1
| |
* | Put spaces between the words at deprecation warningRafael Mendonça França2012-01-311-3/+3
|/
* suggested fixes for :dependent => :restrict deprecation.Manoj2012-01-311-1/+1
|
* Same method for has_many and has_one associationsPaco Guzman2012-01-311-0/+15
|
* has_many/has_one, :dependent => :restrict, deprecation added.Manoj2012-01-291-1/+15
|
* Deprecate inferred JOINs with includes + SQL snippets.Jon Leighton2012-01-161-1/+1
| | | | | | See the CHANGELOG for details. Fixes #950.
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-161-1/+1
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* Deprecate implicit eager loading. Closes #950.Jon Leighton2011-12-291-1/+1
|
* avoid warningsJosh Susser2011-11-271-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.