Method: Padrino::Flash::Helpers#redirect
- Defined in:
- padrino-core/lib/padrino-core/application/flash.rb
#redirect(url) ⇒ Object #redirect(url, status_code) ⇒ Object #redirect(url, status_code, flash_messages) ⇒ Object #redirect(url, flash_messages) ⇒ Object Also known as: redirect_to
Overloads the existing redirect helper in-order to provide support for flash messages.
205 206 207 208 209 210 211 212 213 214 |
# File 'padrino-core/lib/padrino-core/application/flash.rb', line 205 def redirect(url, *args) flashes = args.last.is_a?(Hash) ? args.pop : {} flashes.each do |type, | = I18n.translate() if .is_a?(Symbol) && defined?(I18n) flash[type] = end super(url, args) end |