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