Module: Voltex::Pundit

Defined in:
lib/voltex/pundit.rb

Instance Method Summary collapse

Instance Method Details

#permission?(resource, action) ⇒ Boolean



3
4
5
6
7
# File 'lib/voltex/pundit.rb', line 3

def permission?(resource, action)
  user.send(Voltex.permissions_name).where(
    resource: resource.to_s,
    action: action).exists?
end