class AutoForme::Request

  1. lib/autoforme/request.rb
Superclass: Object

Request wraps a specific web request for a given framework.


action_type [R]

A string representing the action type for the request

controller [R]

The underlying web framework request instance for the request

env [R]

The HTTP request environment hash

id [R]

The id related to the request, which is usually the primary key of the related model instance.

method [R]

The request method (GET or POST) for the request

model [R]

A string representing the model for the request

params [R]

The params for the current request

path [R]

A string representing the path that the root of the application is mounted at

session [R]

The session variables for the current request

Public Instance methods

post? ()

Whether the current request used the POST HTTP method.

[show source]
# File lib/autoforme/request.rb, line 35
def post?
  method == 'POST'
query_string ()

The query string for the current request

[show source]
# File lib/autoforme/request.rb, line 40
def query_string
set_flash_notice (message)

Set the flash at notice level when redirecting, so it shows up on the redirected page.

[show source]
# File lib/autoforme/request.rb, line 46
def set_flash_notice(message)
  @controller.flash[:notice] = message
set_flash_now_error (message)

Set the current flash at error level, used when displaying pages when there is an error.

[show source]
# File lib/autoforme/request.rb, line 52
def set_flash_now_error(message)[:error] = message