Is there an easy way in ActiveRecord to fully delegate an attribute to an associated (has_one) model, including validations?
-
-
Any thoughts on having delegated attributes that are totally transparent from the POV of the view layer? I'm thinking about the fact that the delegating model won't expose validation errors on delegated fields.
-
It's an interesting idea. I have long been wanting to work on a feature called composed attributes, this could be a special case of that. Keep in mind that attributes also affect things like `where` but that sounds like a good thing for the case you're describing.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.