search for: pagenode

Displaying 5 results from an estimated 5 matches for "pagenode".

2006 Jun 26
7
Using Rails to Generate static pages
Hi all, Has anyone ever thought about or implemented a way to use Rails to pull content from a database and actually *generate* static html pages from view templates? I want to throw a bunch of content into a db using rails and then put all my website templates into the views dir and write the files out with the content inside. The funny thing is that the html pages Rails normally outputs to
2006 Jan 10
1
Problem with belongs_to
...column that refers to another row in another table (the subclass knows what table). I also have another class that have this line class Page < ActiveRecord::Base belongs_to :node, :foreign_key => "data_id", :conditions => "type == ''PageNode''" ... It''s supposed to refer back to the Node class so I can get to the node from a Page instance using @page.node.what_ever The problem now is that @page.node == nil. I have checked the tables and the data is correct (it must be since navigation from node to page wor...
2006 May 24
10
Ferret slow after a while
...#39;development'' puts "Environment : #{ENV[''RAILS_ENV'']}" require ''config/environment.rb'' require ''ferret'' index = Ferret::Index::Index.new( :path => Node.class_index_dir, :create => true) Node.find_all_by_type("PageNode").each { |content| puts "ID: #{content.id} => name: #{content.title}" index << content.to_doc if content.respond_to?("to_doc") } index.flush index.optimize index.close -- Posted via http://www.ruby-forum.com/.
2005 Nov 01
5
Strange error(s) on windows only
I have some strange behaviour on Windows XP boxes (the same code on Linux doesn''t have the same behaviour). Ruby 1.8.2 and Rails 0.14.2. I have a single inheritance table nodes with a base class Node (acts_as_tree) and some subclasses such as PageNode and FolderNode. If I render the tree in an iframe in a set of iframes it doesn''t work, if I render it stand alone it works (there are three iframes with different url:s for each, nothing strange). The error is really bizarre. On some of the nodes ruby complains that "children is...
2006 Feb 12
6
Including another helper
I need to include another helper module apart from the normal two (ApplicationHelper and [controllername]Helper). The inclusion needs to be dynamic and based on external parameters (ie what helper that get included differ from request to request). Is it possible? How? /Marcus