I did some research and couldn’t find a suitable answer so I’m reaching out…..
Using Rails 3.1 and trying to create a post for a user. When I go to create a test post I get the error:
Missing template events/create, application/create with {:locale=>[:en, :en],
:formats=>[:html], :handlers=>[:coffee, :erb, :builder]}
Is this a template or should I adjust my routes?
Thanks in advance for any help.
From the log you provided here, you should be posting to Events controller’s create method.
The following is copied from your repo:
So if
@event.savefailed, there’s no redirect and the render is commented out. So by default, rails 3.1 will try to find the view file in the following order: events/create, application/create (it matches your log)With failing event.save, you would most likely
render "new"so that it will use events/new.html.erb for the view file. (of course this is not a must, you could render anything you want or even redirect if you like)(Hope that what I am viewing on the repo isn’t a modified one 🙂 )