> class Page < ActiveRecord::Base Should be:
YourPageClassName < Page On Feb 3, 2007, at 4:10 PM, Jacob Burkhart wrote: > Hey I feel like I'm missing something obvious, > > I created an extension that adds some columns to the pages table, and > now I want to add some methods to the Page class. > > I put this at the bottom of my Extension class > > class Page < ActiveRecord::Base > > def test_new_method > "hi" > end > > end > > > And now I'm getting errors like: > > undefined method `children' for #<Page:0x2280638> > undefined method `parts' for #<Page:0x2280638> > > > Which leads me to believe that my version of Page is being loaded, and > the original version is not. > > How do I get them both to load? what's really going on here? > > > > Also, can somebody tell why "logger" is not defined from my Extension > class > How can I access the logger? > > > thanks, > Jacob > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Radiant mailing list > Post: [email protected] > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
