Hi, I'm building my own homepage with this wonderfull "new" framework, so far all has been very smooth until now.
I have a table (MySQL MyISAM) called "pages", which hold an id, title and some content, now, I'm trying to make a "page" able to hold another page by giving each "page"-row a "page_id" column, this clearly wont work. My experience with table relations is quite limited. Any ideas how I would solve this as simple and cleanly as possible?
I tried this in the model:
class Pages < ActiveRecord::Base has_many :pages end
But when using the above and trying to do:
page.pages.title
in the view I get:
"../active_support/dependencies.rb:100:in `const_missing': uninitialized constant Page"
Using page.page just gives me an "undefined method" error.
Thanks in advance