module SimpleFlash::ControllerHelpers
Private Instance Methods
_flash_lookup(type)
click to toggle source
# File lib/simple_flash/controller_helpers.rb, line 15 def _flash_lookup(type) t(".#{type}", cascade: true) end
redirect_to_with_fail(url, options = {})
click to toggle source
# File lib/simple_flash/controller_helpers.rb, line 10 def redirect_to_with_fail(url, options = {}) options[:alert] = _flash_lookup("fail") redirect_to url, options end
redirect_to_with_success(url, options = {})
click to toggle source
# File lib/simple_flash/controller_helpers.rb, line 5 def redirect_to_with_success(url, options = {}) options[:notice] = _flash_lookup("success") redirect_to url, options end