hide_action

hide_action(*args) Instance Public methods Sets all of the actions passed in as hidden actions. Parameters args - A list of actions

action_methods

action_methods() Instance Public methods Overrides AbstractController::Base#action_methods to remove any methods that are listed as hidden methods.

modules_for_helpers

modules_for_helpers(args) Instance Public methods Overwrite #modules_for_helpers to accept :all as argument, which loads all helpers in helpers_path. Parameters args - A list of helpers Returns array - A normalized list of modules for the list of helpers provided.

helpers

helpers() Instance Public methods Provides a proxy to access helpers methods from outside the view.

helper_attr

helper_attr(*attrs) Instance Public methods Declares helper accessors for controller attributes. For example, the following adds new name and name= instance methods to a controller and makes them available to the view: attr_accessor :name helper_attr :name Parameters attrs - Names of attributes to be converted into helpers.

all_helpers_from_path

all_helpers_from_path(path) Instance Public methods

head

head(status, options = {}) Instance Public methods Returns a response that has no content (merely headers). The options argument is interpreted to be a hash of header names and values. This allows you to easily return a response that consists only of significant headers: head :created, location: person_path(@person) head :created, location: @person It can also be used to return exceptional conditions: return head(:method_not_allowed) unless request.post? return head(:bad_request)

force_ssl_redirect

force_ssl_redirect(host_or_options = nil) Instance Public methods Redirect the existing request to use the HTTPS protocol. Parameters host_or_options - Either a host name or any of the url & redirect options available to the <tt>force_ssl</tt> method.

force_ssl

force_ssl(options = {}) Instance Public methods Force the request to this particular controller or specified actions to be under HTTPS protocol. If you need to disable this for any reason (e.g. development) then you can use an :if or :unless condition. class AccountsController < ApplicationController force_ssl if: :ssl_configured? def ssl_configured? !Rails.env.development? end end URL Options You can pass any of the following options to affect the redirect url host

redirect_to

redirect_to(options = {}, response_status_and_flash = {}) Instance Protected methods