Hi,
I am trying to refactoring two helper files into one single file.
The helper module is to display act_as_tree model type of object. I am
currently have two helper files that have the same exact code, so I
decided to combined them into one single file. Then have the controller
to include the correct helper module.
My problem is at the tree helper module. I need to have access to the
model object, instead of just hardcoding the name of model object. I
tried to look around at the documentation, but got nowhere. Any idea on
how to get to the corresponding model object ?
Thanks in advance,
Leon
------------------
class MarketplaceController < ApplicationController
helper :tree
end
class ListingController < ApplicationController
helper :tree
end
module TreeHelper
def display_node
Marketplace.root() #???
end
end
Leon Yeh
New Avenue Systems Inc.
Imagination Delivered. www.newavenue.net
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby