Sha256: aaa52ea355abba8c2eae1fafef31c06fd89a02e5e80b34cdad761093ff34bbf1

Contents?: true

Size: 275 Bytes

Versions: 3

Compression:

Stored size: 275 Bytes

Contents

class Shared::NoAldousViewPrecondition < BasePrecondition
  delegate :current_user, :current_ability, to: :action

  def perform
    controller.render(
      template: 'defaults/forbidden',
      status: :unprocessable_entity,
      locals: {error: 'Foobar'}
    )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aldous-1.1.3 examples/basic_todo/app/controller_actions/shared/no_aldous_view_precondition.rb
aldous-1.1.2 examples/basic_todo/app/controller_actions/shared/no_aldous_view_precondition.rb
aldous-1.0.1 examples/basic_todo/app/controller_actions/shared/no_aldous_view_precondition.rb