ruby - undefined method `params_require' - New into rails -
i try code small blog in rails , when tried save post through website error. can create post console thats not goal.
this code create method:
def create @post = post.new(post_params) if post.save redirect_to post.path else render "new" end end def post_params params_require(:post).permit(:title, :content) end
would nice if can me.
def post_params params.require(:post).permit(:title, :content) end
change params_require
params.require
Comments
Post a Comment