Forum: Ruby on Rails class does not inherit (?) ActionRecord::Base

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.
F98cf209574a86849695952076567ba9?d=identicon&s=25 lumeda (Guest)
on 2006-05-31 23:06
Hi.  I'm a newbie at this, so please bear with me.

I have several classes which model several corresponding tables.  All of
them seem to work except one.  I have not made many modifications from
the scaffold templates. However, with one class, Log, all methods give
me the following type of error

NoMethodError in LogController#create
undefined method `save' for #<WEBrick::Log:0x3b0cfb8>

NoMethodError in LogController#list
undefined method `find_all' for WEBrick::Log:Class


This is my entire Log class

class Log < ActiveRecord::Base
  belongs_to :batch
  has_many :links
end


Please help!  Thank you in advance.
F98cf209574a86849695952076567ba9?d=identicon&s=25 lumeda (Guest)
on 2006-05-31 23:13
I just realized my typo on the subject.  I meant ActiveRecord, but I
assure you it is not misspelled in my code!
Ed5307c79ba5b415b1ddfee48319099b?d=identicon&s=25 Ioana Kanda (Guest)
on 2006-05-31 23:23
(Received via mailing list)
I think u should give another name to your model. It seems that Log is
already taken. Try that for a change.
F98cf209574a86849695952076567ba9?d=identicon&s=25 lumeda (Guest)
on 2006-06-01 01:29
Thank you! Grazie! Thank you!

I feel a bit foolish for struggling with something so simple!

Now it works beautifully.



Ioana Kanda wrote:
> I think u should give another name to your model. It seems that Log is
> already taken. Try that for a change.
This topic is locked and can not be replied to.