A user can sign up as an artist. All the user needs to do now, is provide his email.
In Artist controller, def create. Is it normal to have something like:
def create
@artist = current_user
respond_to do |format|
if @artist.update_attributes(params[:user]) # params[:user] contains email
@artist.is_artist = true
@artist.save
....
In my User model, I have:
attr_accessible :email
Which means, I can’t simply do @artist.update_attributes(:is_artist => true). I would have to use the save method instead. Is this type of approach common? Or is there a better way?
You can define before_create method in your model: