I receive an error when trying to edit a post:
posts#edit controller:
def edit
@post = Post.find params[:id]
end
posts#update controller:
def update
@post = Post.find params[:post]
if @post.update_attributes params[:post]
redirect_to posts_path
else
render 'edit'
end
end
edit view:
h1 Edit Post
= form_for @post do |f|
p
= f.label :title
= f.text_field :title
p
br
p
= f.label :content
= f.text_area :content
p
br
p
= f.submit 'Update Post'
p
br
This is when I get the ArgumentError in PostsController#update, Unknown Key: title error. I am still wrapping my head around the strong parameter concept in Rails 4 so it might have something to do with this...any ideas?