Kad Kerforn
2008-Feb-23 10:04 UTC
where should I write my helper''s method with domain route?
I am using a domain route Admin class Admin::MembersController < ApplicationController so I have my views in app > views > admin > members and my helpers in app > helpers > admin > members (module Admin::MembersHelper) fine, it''s running well in one of my application layouts partials , _members.html.erb, I try to use a method <%= filtrate(current_user) %> but I get an error ActionView::TemplateError (undefined method `filtrate'' for #<ActionView::Base:0x32ea330>) on line #7 of layouts/_members.html.erb: I wrote the filtrate method in my Admin::MembersHelper ... is it wrong ? why ? where should I write it ? thanks for your help -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Kad Kerforn
2008-Feb-23 10:41 UTC
Re: where should I write my helper''s method with domain rout
> I wrote the filtrate method in my Admin::MembersHelper ... is it wrong ? > why ? > where should I write it ? > > thanks for your helpfound the problem.... I was trying to use the wrong helper,I should have look after the current controller at this time... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---