Rails will stop looking in its path once a constant is loaded, so you
can''t open classes like that without a little extra effort. Your best
bet is to either (a) hack the plugin or (b) copy the plugin''s model
into app/models.
--Jeremy
On Thu, Jun 12, 2008 at 12:36 AM, Infinit
<infinitblue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi,
>
> I added a comment model in app/models, and when I execute the
> following code:comment.commentable, the following error occurs
> NoMethodError: undefined method `commentable'' for #<Comment..
> .
> But when I delete the comment model, it''s ok.
>
> When add another comment model in app/models, will it override the
> default comment model provided by the plugin or just open the comment
> class?
>
> Thanks for your help.
> >
>
--
http://jeremymcanally.com/
http://entp.com
Read my books:
Ruby in Practice (http://manning.com/mcanally/)
My free Ruby e-book (http://humblelittlerubybook.com/)
Or, my blogs:
http://mrneighborly.com
http://rubyinpractice.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---