Sha256: eda298cdf2fd1ed7e7bdfdf6983c59d90ed51899f8947389e0155785a7151714
Contents?: true
Size: 419 Bytes
Versions: 3
Compression:
Stored size: 419 Bytes
Contents
class ExampleController < ApplicationController before_action :authenticate_user!, except: :not_restricted before_action -> { authorise_user!("execute") }, only: :this_requires_execute_permission def not_restricted render body: "jabberwocky" end def restricted render body: "restricted kablooie" end def this_requires_execute_permission render body: "you have execute permission" end end
Version data entries
3 entries across 3 versions & 1 rubygems