Ruby On Rails and more...
Monday, 26 May 2014
Unpermitted parameters not saving in database of rails4
Unpermitted parameters: pid, rating
we can make permit-able by adding these two fields in a private method of your controller [controler]_params
ex: reviews_controller
method:
def review_params
params.require(:review).permit(:name, ....... :beggrgrill
, :rating, :pid
)
end
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment