Forum: Rails Engines development how to put the model class in module?

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.
Oliver P (Guest)
on 2006-03-22 22:50
I meet a strange problem. I have a table name is application. So I have
to use Application as the model class name. But it reports error. If I
put the model class into my special module and require the file in
controller, it works. But I find that all predefined methods in Active
Record are no longer effective, such as validate and so on.

Can you please give me some idea on this problem? Thanks .
James A. (Guest)
on 2006-03-23 03:22
(Received via mailing list)
This list is for discussion of the development of engines plugin - it
sounds like your issue is to do with Rails in general, rather than the
plugin, and therefore you may get a better response (from a wider
audience) if you post this to the correct list.

That said, I can imagine that Rails won't like you having a model
called Application, since it would reside in a file called
application.rb, which clashes with the ApplicationController file. You
may simply have to choose a different name for your model...

- james

On 3/22/06, Oliver P <removed_email_address@domain.invalid> wrote:
> _______________________________________________
> engine-developers mailing list
> removed_email_address@domain.invalid
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
This topic is locked and can not be replied to.