Hi all !
I've got a problem in my application. I've written a bug_reports
controller. It is pretty RESTful, there are index, new and create
actions. Everytime I submit a new bug_report, the index action is
called, not the create action, you can see the log here: http://pastie.org/258857.
My form looks like this:
<% form_for @bug_report, :url => bug_reports_path do |f| -%>
<%= f.text_field :title, :value => "Title" %>
<%= f.text_area :body %>
<%= f.submit "Submit", :disable_with => 'Submiting...' %>
<% end -%>
My routes.rb contains this line: map.resources :bug_reports
And finally, my BugReportsController looks like this:
class BugReportsController < ApplicationController
@bug_reports = BugReport.all
@bug_report = BugReport.new
@bug_report = BugReport.new params[:bug_report]
flash[:notice] = "Thank you for submitting this bug."
flash[:warning] = "Your bug report was not saved. Please try
This error doesn't occur in other parts of my app. I really don't know
why this happens, I hope you can help me. Thank you very much in
PS: I've written a small patch regarding
options_from_collection_for_select. You can find it here:
I would be happy if someone would give me feedback on this.