On Dec 24, 11:28 pm, Paul Olivers <[email protected]> wrote:
> I have 2 distinct types of users (artists and curators) in my system and
> they currently share all associations (eg has_one :portfolio).
> However, a curator shouldn't have a portfolio so I would like to only
> add that association when required. Obviously I could just return nil
> for that method, but it doesn't feel right having that there in the
> first place.
>
> What's the best way to get around this? I've looked at using eval in
> after_find to call the has_one, but couldn't get it working.

Have you considered STI ?

Fred

>
> Any thoughts?
>
> thanks!
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to