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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -