For one of my projects I\'m getting this exception every now and then:
ActionView::MissingTemplate: Missing template blogs/index with {:handlers=>[:rx
I fixed this issue (a few minutes ago – so far, so good) with this new Rails 3.1 option:
config.action_dispatch.ignore_accept_header = true
As mentioned in this Rails issue. That goes in config/application.rb
.
I tested it like so in a RSpec request test (using Capybara):
it "should not break with HTTP_ACCEPT image/*;w=320;h=420 from iPhone" do
page.driver.header "Accept", "image/*;w=320;h=420"
visit "/some/path"
page.should have_content("Some content")
end