hi i have books_controller(action new index show create update..) by scaffolding and i add these lines to my program
****books_controller action def buy @book = Book.find(params[:id]) @book.user = current_user end ****routes.rb map.resources :books, :collection => { :buy => :get } ****books_ index.html.erb <%= link_to 'buy', buy_book_path(book) %> but when i am logging to books_index page NoMethodError in Books#index undefined method `buy_book_path' for #<ActionView::Base:0x64a45b0> why i'm getting this error? -- View this message in context: http://old.nabble.com/NoMethodError-in-Books-index-tp26850510p26850510.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.