Sha256: 1140b00b64f7ea02a22de5a7e3cb796c02ec59dd26e9e33cac1ef2438aeaf959
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
module Merb::Test::Fixtures::Controllers class Testing < Merb::Controller self._template_root = File.dirname(__FILE__) / "views" end class SimpleRedirect < Testing def index redirect("/") end end class RedirectViaHalt < Testing def index throw :halt, redirect("/") end end class PermanentRedirect < Testing def index redirect("/", :permanent => true) end end class PermanentAndStatusRedirect < Testing def index redirect("/", :permanent => true, :status => 302) end end class WithStatusRedirect < Testing def index redirect("/", :status => 307) end end class RedirectWithMessage < Testing def index redirect("/", :message => { :notice => "what?" }) end end class RedirectWithNotice < Testing def index redirect("/", :notice => "what?") end end class RedirectWithError < Testing def index redirect("/", :error => "errored!") end end class RedirectWithMessageAndFragment < Testing def index redirect("/#someanchor", :message => { :notice => "what?" }, :fragment => "someanchor") end end class ConsumesMessage < Testing def index message[:notice] end end class SetsMessage < Testing def index message[:notice] = "Hello" message[:notice] end end end
Version data entries
3 entries across 3 versions & 1 rubygems