Bad idea to add/remove associations in after_find

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.

Any thoughts?

thanks!

Can an artist also be a curator?

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

+1 for STI, if an artist cannot be a curator. Roles with CanCan, if an artist can be a curator.

better use cancan also you can create type filed make polymorphic ossification and create different users of different roles