mardi 15 décembre 2015

Applicaiton controller not working

I am trying to set the id to default_working_production_id to 0 if the record has been deleted from the database. These lines work in the productions controller however don't work in the application controller. Any thoughts?

unless Production.exists?(:id => current_user.default_working_production_id)
    current_user.default_working_production_id = 0
    current_user.default_working_production_name = "No Current Production Set"
 end

Aucun commentaire:

Enregistrer un commentaire