Hi all,
I use inheritance in my model. An event has different types:
Event < activity
Event < training
Event < game
I want to set session data to every event type like
game.user_id = session[:user_id]
training.user_id = session[:user_id]
activity.user_id = session[:user_id]
I want to avoid writing @game.user_id = session[:user_id] , ..., ... in every create method in the controller of activity, game and training
Someone knows how to approach this best.
Thanks