Leon,

Add this method to app/helpers/application_helper.rb

def tree_model
  @controller.send :tree_model
end

Thanks!

On Jun 27, 2007, at 2:49 PM, [EMAIL PROTECTED] wrote:

Hi Jordan,

Thanks for the help, I paste the code in, but for some reason, from tree_helper.rb I can not call MarketplaceController method. This is wierd.

Leon



-----Original Message-----
From: "Jordan A. Fowler" <[EMAIL PROTECTED]>
Sent: Wed, June 27, 2007 1:58 pm
To: [email protected]
Subject: Re: [Sdruby] Accessing Model object from controller

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
I've made a mistake. To fix this, I think we should add one more
method to application.rb and change the code for accessing current
model. See notes below:


_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

--------------------------------------------------------------
Jordan A. Fowler
1830 Market St. #4
San Diego, CA 92102
E-mail: [EMAIL PROTECTED]
AIM: virtuosojordan
Phone: 406.546.8055


_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to