Class: CardController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Card::Env::Location, Errors, Mark, Response, Rest
Defined in:
decko/lib/card_controller.rb,
decko/lib/card_controller/mark.rb,
decko/lib/card_controller/rest.rb,
decko/lib/card_controller/errors.rb,
decko/lib/card_controller/response.rb,
card-mod-alias/lib/card_controller/aliasing.rb

Overview

Decko’s only controller.

Defined Under Namespace

Modules: Aliasing, Errors, Mark, Response, Rest

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Card::Env::Location

#card_path, #card_url, #cardname_from_url, #protocol_and_host

Methods included from Errors

#debug_exception?, #handle_exception

Methods included from Response

#response_format

Methods included from Rest

#asset, #create, #delete, #read, #update

Instance Attribute Details

#cardObject (readonly)

Returns the value of attribute card.



17
18
19
# File 'decko/lib/card_controller.rb', line 17

def card
  @card
end

Class Method Details

.rescue_all?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'decko/lib/card_controller/errors.rb', line 10

def rescue_all?
  Cardio.config.rescue_all_in_controller
end

.rescue_from_class(*klasses) ⇒ Object



4
5
6
7
8
# File 'decko/lib/card_controller/errors.rb', line 4

def rescue_from_class *klasses
  klasses.each do |klass|
    rescue_from(klass) { |exception| handle_exception exception }
  end
end