def handle_redirect_messages(url, opts={})
      opts = opts.dup

      # check opts for message shortcut keys (and assign them to message)
      [:notice, :error, :success].each do |message_key|
        if opts[message_key]
          opts[:message] ||= {}
          opts[:message][message_key] = opts[message_key]
        end
      end
      
      # append message query param if message is passed
      if opts[:message]
        notice = Merb::Parse.escape([Marshal.dump(opts[:message])].pack("m"))
        u = ::URI.parse(url)
        u.query = u.query ? "#{u.query}&_message=#{notice}" : "_message=#{notice}"
        url = u.to_s
      end
      
      url
    end
def handle_redirect_messages(url, opts={})
      opts = opts.dup

      # check opts for message shortcut keys (and assign them to message)
      [:notice, :error, :success].each do |message_key|
        if opts[message_key]
          opts[:message] ||= {}
          opts[:message][message_key] = opts[message_key]
        end
      end
      
      # append message query param if message is passed
      if opts[:message]
        notice = Merb::Parse.escape([Marshal.dump(opts[:message])].pack("m"))
        u = ::URI.parse(url)
        u.query = u.query ? "#{u.query}&_message=#{notice}" : "_message=#{notice}"
        url = u.to_s
      end
      
      url
    end
Process a redirect url with options, appending messages onto the url as query params

 ==== Parameter
 url<String>:: the url being redirected to

 ==== Options (opts)
 :message<Hash>::
   A hash of key/value strings to be passed along within the redirect query params.
 :notice<String>::
   A shortcut to passing :message => {:notice => "..."}
 :error<String>::
   A shortcut to passing :message => {:error => "..."}
 :success<String>::
   A shortcut to passing :message => {:success => "..."}

 ==== Returns
 String:: the new url with messages attached

 :api: private