Forum: Ruby on Rails uninitialized constant error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ryan P. (Guest)
on 2006-04-02 05:55
Im getting this error:

NameError in Tourdates#list

uninitialized constant Tourdate

How may I fix uninitialized constant?
Wilson B. (Guest)
on 2006-04-02 11:43
(Received via mailing list)
On 4/1/06, Ryan P. <removed_email_address@domain.invalid> wrote:
> Im getting this error:
>
> NameError in Tourdates#list
>
> uninitialized constant Tourdate
>
> How may I fix uninitialized constant?
>

Make sure items in your application are named like this:

In a file named your_rails_project/app/models/tour_date.rb
class TourDate < ActiveRecord::Base
# stuff here
end

..a table called 'tour_dates'.
Other models that refer to TourDate have one or more of:
belongs_to :tour_date
has_many :tour_dates
has_one :tour_date

--Wilson.
This topic is locked and can not be replied to.