Sha256: 691bf4d699f297695277dd4c104b5993ead4732805481fdff5d837155f4a842b

Contents?: true

Size: 260 Bytes

Versions: 2

Compression:

Stored size: 260 Bytes

Contents

module ProtectControllerActionsSpec
  DummyControllerPolicy = Struct.new(:current_user, :controller) do
    def create?
      current_user && current_user.create_allowed?
    end

    def show?
      current_user && current_user.show_allowed?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
access_policy_rails-0.0.2 spec/acceptance/support/dummy_controller_policy.rb
access_policy_rails-0.0.1 spec/acceptance/support/dummy_controller_policy.rb