hi,

i am using <%= s.submit 'Product save' %>
when i click it, following error appears

" Routing Error

uninitialized constant ProductsController"


could any one provide me solution ?


thanks,
-pab

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Tim Shaffer at Sep 21, 2011 at 2:58 pm
    Do you have a controller named ProductsController?

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/sUuMsWHWdxoJ.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Pab at Sep 21, 2011 at 3:29 pm
    hi
    well i am have having contoller named ProductController
    but its asking for ProductsController
    i don't know how to over come this problem?


    thanks,
    -pab

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Tim Shaffer at Sep 21, 2011 at 3:36 pm
    It's Rails convention that controllers should use the plural name of the
    model, like Product*s*Controller

    You could probably make it work by using the singular name of the model, but
    it would go against convention and wouldn't be very easy to maintain.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wBK5-3qjDqwJ.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Everaldo Gomes at Sep 21, 2011 at 3:36 pm

    On Wed, Sep 21, 2011 at 12:29 PM, Pab wrote:
    hi
    well i am have having contoller named ProductController
    but its asking for ProductsController
    i don't know how to over come this problem?

    Hi,
    rename your controller from ProductController to ProductsController. In
    Rails, the convention is the plural in controller's name.

    Best Regards,
    Everaldo

    thanks,
    -pab

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Sep 21, 2011 at 3:51 pm

    On 21 September 2011 16:35, Everaldo Gomes wrote:
    On Wed, Sep 21, 2011 at 12:29 PM, Pab wrote:

    hi
    well i am have having contoller named ProductController
    but its asking for ProductsController
    i don't know how to over come this problem?
    Hi,
    rename your controller from ProductController to ProductsController. In
    Rails, the convention is the plural in controller's name.
    and of course the file should be products_controller.rb and the model
    should be Product in products.rb and the table name products.

    Colin
    --
    gplus.to/clanlaw

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 21, '11 at 2:49p
activeSep 21, '11 at 3:51p
posts6
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase