I am trying to submit a test post through my form, and I am getting this error: param is missing or the value is empty: content. I am requiring "content" and permitting a "title". Both fields were filled out when submitting the post or "thought" in my app. I believe the problem has something to do with strong parameters. I can't find the answer anywhere else on the internet. Here is my controller.
class ThoughtsController < ApplicationController
def index
end
def new
@thought = Thought.new(params[:id])
end
def create
@thought = Thought.new(params[post_params])
@thought.save
if @thought.save
redirect_to @thought
else
render :new
end
end
private
def post_params
params.require(:content).permit(:title)
end
end
Thanks for the help.