NameError on accessing Active Record from the controller with Rails 2.0.2

I get following error on accessing ActiveRecord from the controller,


NameError (uninitialized constant ProductsController::Question):
active_support/dependencies.rb:478:in const_missing' /app/controllers/products_controller.rb:14:inbuild’


def build
@qs = Question.find(:all)

I could not find much information relevant to my scenario on
NameError, Please let me know, if someone have any idea on whats going

Your help be greatly appreciated.

What exactly is your Question? Another model in your application? From
the looks of it, Rails doesn’t know what a Question is…

Thanks for the reply. It helps to figure out the issue.

It was the model generation mistake. I have generated with model name in

Thanks again.

On Sun, Mar 23, 2008 at 11:24 PM, Ar Chron
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs