Tom Mac
2011-Nov-22 10:56 UTC
Is there any problem extend ApplicationHelper in application controller
Hi I have a function in ApplicationHelper say an example def url_needed if current_user.is_staff? home_url else another_url end end And in ApplicationController what I did is def check_for_the_feature flash[:notice] = ''You have no permission to do this.'' self.extend ApplicationHelper redirect_to url_needed end Is there any problem extending helper like this. Thanks -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.