Module: Rad::Controller::Http

Includes:
ForgeryProtector
Defined in:
lib/rad/controller/_http.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary

Attributes included from ForgeryProtector

#authenticity_token

Instance Method Summary collapse

Instance Method Details

#render(*args) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/rad/controller/_http.rb', line 7

def render *args
  if args.size == 1 and (status = Rad::Http::Response.decode_status_message(args.first))
    response.set! status: status
    throw :halt, ""
  else
    super
  end
end

#requestObject



4
# File 'lib/rad/controller/_http.rb', line 4

def request; rad.workspace? ? workspace.request : nil end

#responseObject



5
# File 'lib/rad/controller/_http.rb', line 5

def response; rad.workspace? ? workspace.response : nil end