Module Responders::ControllerMethod
In: lib/responders/controller_method.rb

Methods

Public Instance methods

Adds the given responders to the current controller‘s responder, allowing you to cherry-pick which responders you want per controller.

  class InvitationsController < ApplicationController
    responders :flash, :http_cache
  end

Takes symbols and strings and translates them to VariableResponder (eg. :flash becomes FlashResponder). Also allows passing in the responders modules in directly, so you could do:

   responders FlashResponder, HttpCacheResponder

Or a mix of both methods:

   responders :flash, MyCustomResponder

[Validate]