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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -