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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to