I have a back button setup on my Show Event page and its simply:
<%= button_to "Back",events_path %>
When i click this to return to my events index I get the message The action ‘create’ could not be found for EventsController. That’s true I dont have a create action but why is it looking for one? It should just be returning me to the index of events and I’m not passing any parameters correct?
I tried adding :only => [:index, :show] to my routes entry but that didn’t solve the problem. Any other suggestions or could you explain why it is trying to create? Thanks!
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-button_to
The default method is POST. You want: