class ActionController::Base

Public Instance Methods

respond_with(*resources, &block) click to toggle source
Calls superclass method
# File lib/solidus_responders/controller_helpers/respond_with.rb, line 5
def respond_with(*resources, &block)
  if Spree::BaseController.spree_responders.keys.include?(self.class.to_s.to_sym)
    # Checkout AS Array#extract_options! and original respond_with
    # implementation for a better picture of this hack
    if resources.last.is_a? Hash
      resources.last[:action_name] = action_name.to_sym
    else
      resources.push action_name: action_name.to_sym
    end
  end

  super
end