I am createing simple ruby blog app I am updating a post but it's showing thi type error error
        def edit
            @post = Post.find(params[:id])
        end
        def update
            @post = Post.find(params[:id])
            if @post
                puts "******************dd*********************"
                puts params[:post]
                puts "**************************************"
                @post.update_attributes(params[:post])
                redirect_to post_path, :notice => "you post  has been updated"
            else
                render "edit"
            end
        end
but when I using this
        @post.update_attributes({"title"=>"2nd", "body"=>"this is second post body", "category_id"=>"2"})
it is work
 
     
     
    