I got this error on loading the page and I would guess that it has somethinng to do with my create method in the controller
My controller looks like this
class StoryController < ApplicationController
@story = Story.all
@story = Story.new
@story = Story.new(story_params)
flash[:notice] = "Story created successfully"
flash[:notice] = "Story is invalid, man"
@story = Story.find(params[:id])
<%= form_for @story ,url: story_path do |f| %>
<%= label :story, :title %><br />
<%= text_field :story, :story_title %>
<%= label :story, :body %><br />
<%= text_field :story, :story_body %>
<%= submit_tag 'Create story' %>
<% end %>
The create method is a POST... so when he enters story/create he's already expecting those values... that's why he says he can't find the params... i didn't look at the code deeply but it seems fine. Just change the name of the view to new.html.erb. New is the setup for create.
In new you setup the values and then invoke create where the controller actually creates the story.
Just change the name of the view to new.html.erb and change it to this
<%= form_for @story do |f| %> <%= f.label :title %><br /> <%= f.text_field :story_title %> <%= f.label :body %><br /> <%= f.text_field :story_body %> <%= submit_tag 'Create story' %> <% end %>
as the other user said. you need to say that those inputs belong to form |f| the text_field belongs to f, f.text_field
And of course you access that view through stories/new