Displaying 3 results from an estimated 3 matches for "left_column".
2006 May 31
1
Help enhancing acts_as_nested_set
...Ruby and Rails. Help! At the far bottom of this messgae I''ll
include the entire nested_set.rb file I created. Sorry if this is not the
best way to post to this forum.
def acts_as_nested_set(options = {})
configuration = { :parent_column => "parent_id", :left_column =>
"lft", :right_column => "rgt"}
configuration.update(options) if options.is_a?(Hash)
class_eval <<-EOV
include ActiveRecord::Acts::NestedSet::InstanceMethods
def self.left_col_name() "#{configuration[:left_column]}...
2006 Aug 06
2
better_nested_set plugin
...ehances acts_as_nested_set, adding methods to move parts of the
tree, like:
* move_to_child_of
* move_to_right_of
* move_to_left_of
Pass them an id or an object.
Other methods added by this mixin are:
* root - root item of the tree (the one that has a nil parent;
should have left_column = 1 too)
* roots - root items, in case of multiple roots (the ones that have
a nil parent)
* level - number indicating the level, a root being level 0
* ancestors - array of all parents, with root as first item
* self_and_ancestors - array of all parents and self
* sibling...
2012 Jul 17
24
Static Pages from Railcast
Hi everyone,
I need several pages to be static but also modify when requested. I try
following the railcast from Ryan at
http://railscasts.com/episodes/117-semi-static-pages?view=comments
Here what I have done!!
rails g scaffold Pages name:string permanentlink:string title:string
author:string access_level:string is_published:boolean
meta_description:string meta_keyword:string