This project is archived and is in readonly mode.

#3095 ✓wontfix
Tim Diggins

Generated scaffold for model with same plural as singular gives errors

Reported by Tim Diggins | August 25th, 2009 @ 02:27 PM

If you generate a scaffold from a model for which the plural and singular forms are the same (like species), then there are some errors:

in new.html.erb:
<% form_for(@MODELNAME) do |f| %>
needs to be changed to <% form_for(@MODELNAME, :url=> {:action=>'create'}) do |f| %>

<%= link_to 'Back', MODELNAME_path %>
needs to be changed to
<%= link_to 'Back', MODELNAME_index_path %>

I haven't dived into the code to work out how to add a test for this and patch, but could do if that is likely to be useful

Comments and changes to this ticket

  • José Valim

    José Valim August 30th, 2009 @ 09:39 AM

    • Assigned user set to “José Valim”
  • José Valim

    José Valim August 30th, 2009 @ 04:14 PM

    • State changed from “new” to “wontfix”

    Tim, it seems to be a very rare case where scaffold does not work by default. By this reason, I'm marking it as won't fix. The amount of code necessary to make it work by default does not seem to fit the use.

  • Tim Diggins

    Tim Diggins September 7th, 2009 @ 12:35 PM

    I agree, and that's a very sensible response! Maybe having this "won't fix" issue will do some good, by helping the rare few who have this problem and search for it.

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