rails3 generator doesn't work for new and edit method #83

Closed
gouravtiwari opened this Issue Feb 1, 2011 · 2 comments

Comments

Projects
None yet
2 participants

This scenario should have passed, but failing on the last line. Instead of @user, the template writes users_path, which will not work in case of new and edit action.
Scenario: Generate scaffold with index and new action
Given a new Rails app
When I run "rails g nifty:scaffold User name:string index new"
Then I should see "class User" in file "app/models/user.rb"
And I should see "<%= form_for @user do |f| %>" in file "app/views/users/new.html.erb"

-Gourav

Quickly found that it is using NiftyScaffoldGenerator method item_path, instead of lib\generators\nifty\scaffold\scaffold_generator.rb ' s method item_path. Little confusing to me why Rails 3 generator is using Rails 2 generator methods?

Owner

ryanb commented Feb 14, 2011

fixing form generation when only new action exists for nifty scaffold (thanks gouravtiwari) - closed by 5ffbf7a

@DouglasMeyer DouglasMeyer pushed a commit that referenced this issue Apr 15, 2011

@ryanb ryanb fixing form generation when only new action exists for nifty scaffold…
… (thanks gouravtiwari) - closes #83
5ffbf7a

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment