Rails 3 routing errors - how to remove "?format=" so no more 406 Not Acceptable responses?

I haven’t been able to find an answer yet, and unfortunately I can’t
find anything useful in the API docs to fix this…

I scaffolded exercise_model, but I want all the URLs to be /exercise/*
That means changing
form_for @exercise_model
into what? I already have this entry in routes:
post ‘create_exercise’ => ‘exercise_models#create’

A. form_for @exercise_model, :url =>

That fails on the submit because action="/exercise/create?format="
makes Rails respond with “Completed 406 Not Acceptable”

B. form_for @exercise_model, :as => :exercise

Fails to render the page because there is no class Exercise.
And all 3 of these give the very same URL as #1 above:

C. form_for @exercise_model, :url =>
create_exercise(@exercise_model), :format => :html

D. form_for @exercise_model, :url =>

E. or in routes.rb, making it
constraints :format => “html” do
create_exercise => “exercise_models#create”

What’s the trick, or can’t Rails do this?

Check out the routing guide here -