Sha256: 2909352071d3ba6ad7326f58eda40e80db4101632b548bf3346afbf1e81b03a8

Contents?: true

Size: 925 Bytes

Versions: 21

Compression:

Stored size: 925 Bytes

Contents

# -*- encoding : utf-8 -*-

# Decko's only controller.
class CardController < ActionController::Base
  include Mark
  include Rest
  include Response
  include Errors
  extend Errors::Rescue

  # NOTE: including Card::Env::Location triggers card loading, which triggers mod loading,
  # which can include initializers that add to the CardController class.
  # It's important that it come *after* the modules above, so that mod modules
  # can override them.
  include ::Card::Env::Location

  layout nil
  attr_reader :card

  before_action :setup, except: [:asset]
  before_action :authenticate, except: [:asset]
  before_action :load_mark, only: [:read]
  before_action :load_card, except: [:asset]
  before_action :load_action, only: [:read]
  before_action :refresh_card, only: %i[create update delete]

  rescue_from_class(*Card::Error::UserError.user_error_classes)
  rescue_from_class StandardError if rescue_all?
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
decko-0.18.1 lib/card_controller.rb
decko-0.18.0 lib/card_controller.rb
decko-0.17.0 lib/card_controller.rb
decko-0.16.0 lib/card_controller.rb
decko-0.15.6 lib/card_controller.rb
decko-0.15.5 lib/card_controller.rb
decko-0.15.4 lib/card_controller.rb
decko-0.15.3 lib/card_controller.rb
decko-0.15.2.pre1 lib/card_controller.rb
decko-0.15.1.1 lib/card_controller.rb
decko-0.15.1 lib/card_controller.rb
decko-0.15.0 lib/card_controller.rb
decko-0.14.2 lib/card_controller.rb
decko-0.14.1 lib/card_controller.rb
decko-0.14.0 lib/card_controller.rb
decko-0.13.4 lib/card_controller.rb
decko-0.13.3 lib/card_controller.rb
decko-0.13.2 lib/card_controller.rb
decko-0.13.1 lib/card_controller.rb
decko-0.13.0 lib/card_controller.rb