Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created September 24, 2008 04:24
Show Gist options
  • Save jackdempsey/12479 to your computer and use it in GitHub Desktop.
Save jackdempsey/12479 to your computer and use it in GitHub Desktop.
iff --git a/lib/merb-core/controller/mixins/controller.rb b/lib/merb-core/controller/mixins/controller.rb
index 8c8078c..f5cdadc 100644
--- a/lib/merb-core/controller/mixins/controller.rb
+++ b/lib/merb-core/controller/mixins/controller.rb
@@ -127,7 +127,10 @@ module Merb
def redirect(url, opts = {})
default_redirect_options = { :message => nil, :permanent => false }
opts = default_redirect_options.merge(opts)
- if opts[:message]
+ if opts[:message] || opts[:notice] || opts[:error]
+ opts[:message] ||= {}
+ opts[:message][:notice] = opts[:notice]
+ opts[:message][:error] = opts[:error]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment