This project is archived and is in readonly mode.

#221 ✓stale
Armin Joellenbeck

Routing error with ActionView::Helpers::ActiveRecordHelper#form

Reported by Armin Joellenbeck | May 19th, 2008 @ 10:24 AM

When I use the method above, I get the following error:

Showing projects/show.html.builder where line #9 raised:

No route matches {:action=>"/projects/1"}

Extracted source (around line #9):

6: end

7: end

8:

9: xml << form(:project)

The backtrace is as follows:

vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:368:in `generate'

vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:131:in `rewrite_path'

vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:110:in `rewrite_url'

vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:88:in `rewrite'

vendor/rails/actionpack/lib/action_controller/base.rb:621:in `url_for'

vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:71:in `send'

vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:71:in `url_for'

vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb:420:in `html_options_for_form'

vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb:28:in `returning'

vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb:418:in `html_options_for_form'

vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb:37:in `form_tag'

vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb:84:in `form'

app/views/projects/show.html.builder:9:in `_run_builder_47app47views47projects47show46html46builder'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/rails.rb:76:in `process'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in `synchronize'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in `process'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:159:in `process_client'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `each'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `process_client'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `initialize'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `new'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `initialize'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `new'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:282:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `each'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/lib/mongrel/command.rb:212:in `run'

/home/armin/lib/gems/gems/mongrel-1.1.4/bin/mongrel_rails:281

The content of app/views/projects/show.html.builder is:

content_for :title do

if @project.id.nil?

'New Project'

else

"Project: #{@project.name}"

end

end

xml << form(:project)

The content of config/routes.rb is:

ActionController::Routing::Routes.draw do |map|

map.resources :projects

end

This seems to be a bug, because it has worked with 2.0.2 but it is not working with branch "master".

Thanks in advance,

Armin

P.S.: How can I help to analyze this further?

Comments and changes to this ticket

  • Armin Joellenbeck

    Armin Joellenbeck May 19th, 2008 @ 10:46 AM

    Sorry,

    for the next ticket I schould read the help for formatting the text.

    Armin

  • josh

    josh July 17th, 2008 @ 01:42 AM

    • State changed from “new” to “stale”
    • Tag cleared.

    Closing this ticket as stale. If this is still an issue for you, feel free to reopen this ticket or create a new one with an updated description. Remember those unit tests too ;)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages