I\'m working through Michael Hartl\'s Rails tutorial, and I\'m running into an issue in section 7.3.3. I receive this error message:
ArgumentError in Users#
The order of actions in controller file matters. I had the same error until I figure out the problem on order of action methods. Example. Controller file
def edit
@post = Post.find(params[:id])
end
def update
end
private
def post_params
params.require(:post).permit(:title, :body)
end
I was working on edit action and was getting same error as you. The problem was I have written the edit action under private action. once I changed the order of this actions. It worked like a charm.
What I was trying to achieve ? I was trying to take the values of post instance variable and use it into html form.