dimanche 1 novembre 2015

Rails 4 Strong parameters for associated model

I do have My users model in Rails4 application and I have Defined

def user_params
   params.require(:user).permit(:email)
end

but I am also storing users address in a separate address table and I am filling up email and address both from a single form so how do I add address parameters as well in users strong parameters permit method.

Aucun commentaire:

Enregistrer un commentaire