search for: current_subdomain_name

Displaying 1 result from an estimated 1 matches for "current_subdomain_name".

2011 Nov 28
4
getting a subdomain name in model.
...n Ability.rb ( the file which is placed in models if we install cancan gem). Below is the condition I wanted: ========================================================= user ||= User.new # guest user (not logged in) if (user.role == ''admin'' && user.site_name == current_subdomain_name) can :manage, :all else can :read, :all end ======================================================= current_subdomain_name should be the name of the subdomain on which user is browsing. But i could not get it. I have tried the following was but could not succeed. 1) set...