Ask A Question

Notifications

You’re not receiving notifications from this thread.

Extending Rails Associations with Custom Features Discussion

Great video! I see the point in the first example where just the User needs to know about the client projects, but if you're creating a module and extending it through different classes, why not just add it in the Project class as a scope method? Anyway, is good to know different forms you have to get similar behavior.

Reply

You may not want / need that to be accessible by everyone, in which case you don't want to add it to the ActiveRecord class, just the association.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.