Module: Hydra::Controller::IpBasedAbility

Defined in:
app/controllers/concerns/hydra/controller/ip_based_ability.rb

Instance Method Summary collapse

Instance Method Details

#current_abilityObject

Overriding the default method provided by cancan This passes the remote_ip to the Ability instance



5
6
7
# File 'app/controllers/concerns/hydra/controller/ip_based_ability.rb', line 5

def current_ability
  @current_ability ||= ::Ability.new(current_user, remote_ip: request.remote_ip)
end