ruby - Rails 4 Strong parameters for associated model -
i have users model in rails4 application , have defined
def user_params params.require(:user).permit(:email) end
but storing users address in separate address table , filling email , address both single form how add address parameters in users strong parameters permit method.
like so:
def user_params params.require(:user).permit(:email, address: [:address_attribute]) end
take @ this post, think pretty @ explaining strong parameters.
Comments
Post a Comment