Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

association methods are now generated in modules #3636

Merged
merged 6 commits into from
Nov 29, 2011

Commits on Nov 16, 2011

  1. association methods are now generated in modules

    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.
    joshsusser committed Nov 16, 2011
    Configuration menu
    Copy the full SHA
    7cba6a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9cdf33a View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2011

  1. Configuration menu
    Copy the full SHA
    61bcc31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10834e9 View commit details
    Browse the repository at this point in the history
  3. avoid warnings

    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.
    joshsusser committed Nov 27, 2011
    Configuration menu
    Copy the full SHA
    124c97f View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2011

  1. Configuration menu
    Copy the full SHA
    c347b3c View commit details
    Browse the repository at this point in the history