Hi to all, I am trying to generate my CRUD scripts with scaffold_controller I am using: Loading development environment (Rails 3.0.10) ruby-1.9.2-p290 :001 > My model is quite simple: class Orgjed < ActiveRecord::Base end And in my schema this is how it writes: create_table "orgjeds", :force => true do |t| t.string "naziv" t.datetime "created_at" t.datetime "updated_at" end and I am trying to create controller and all scripts with rails generate scaffold_controller Orgjed After that, script seems to do everything ok: ... create app/views/orgjeds/index.html.erb create app/views/orgjeds/edit.html.erb ... After I start a server this is what happens: NoMethodError in Orgjeds#index Showing xxx/ev_rada/app/views/orgjeds/index.html.erb where line #12 raised: undefined method `orgjed_path'' for #<#<Class:0x9fbe1dc>:0x9fb0cf8> Extracted source (around line #12): 9: 10: <% @orgjeds.each do |orgjed| %> 11: <tr> 12: <td><%= link_to ''Show'', orgjed %></td> 13: <td><%= link_to ''Edit'', edit_orgjed_path(orgjed) %></td> 14: <td><%= link_to ''Destroy'', orgjed, :confirm => ''Are you sure?'', :method => :delete %></td> 15: </tr> also, I looked into _form.html.erb and there are no fields like naziv... Is it a bug or am I doing something wrong? Thank you -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dorijan Jelincic
2011-Aug-19 15:31 UTC
Re: problem with generate scaffold_controller(bug?)
I solve the problem by installing and using Niftygenerators http://compautomatization.blogspot.com/2011/08/ruby-on-rails-3-scaffoldcontroller-not.html -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.