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

Posted by Oliver P (Guest)
on 2006-03-22 21: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 .
Posted by James Adam (Guest)
on 2006-03-23 02: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 <oliver.pengj@gmail.com> wrote:
> _______________________________________________
> engine-developers mailing list
> engine-developers@lists.rails-engines.org
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.