module Responders::FlashResponder
def flash_defaults_by_namespace(status) # :nodoc:
def flash_defaults_by_namespace(status) # :nodoc: defaults = [] slices = controller.controller_path.split("/") lookup = Responders::FlashResponder.namespace_lookup begin controller_scope = :"flash.#{slices.fill(controller.controller_name, -1).join(".")}.#{controller.action_name}.#{status}" actions_scope = lookup ? slices.fill("actions", -1).join(".") : :actions actions_scope = :"flash.#{actions_scope}.#{controller.action_name}.#{status}" defaults << :"#{controller_scope}_html" defaults << controller_scope defaults << :"#{actions_scope}_html" defaults << actions_scope slices.shift end while slices.size > 0 && lookup defaults << "" end