This project is archived and is in readonly mode.
Scaffolding with name that ends in "ie" does not create or edit correctly.
-
Neeraj Singh
- Importance changed from to Low
I am able to create
rails g scaffold Calorie name:string type:stringAnd then I am able to hit both
http://localhost:3000/calories
http://localhost:3000/calories/1
I am using rails edge.
-
chrisopeterson
I can create the scaffolding fine.
Creating and editing records with the scaffold only inserts null values. I have gotten the same results in different dev environments.
Ruby 1.8.7 - Rails 3.0.0
-
Neeraj Singh
- Milestone set to 3.x
- State changed from new to open
-
Neeraj Singh
- Assigned user set to Neeraj Singh
-
Tim Shaffer
I just ran into this same problem. I was able to work around it by adding an inflection:
inflect.irregular 'Lie', 'Lies' -
Rohit Arondekar
The inflector is used to determine the table names. But the inflector isn't perfect. This certainly looks like one of those cases where the inflector doesn't know how to get the plural. In such cases you need to add an inflection in the config/initializers/inflections.rb as mentioned above.
-
Neeraj Singh
- State changed from open to resolved
As others have pointed out adding following line solves the problem.
ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'Calory', 'Calories' end