Sha256: e32cba45058bc4dea28cdd3e60c747a4af174a9c9905658b772bd99dc1693535
Contents?: true
Size: 632 Bytes
Versions: 1
Compression:
Stored size: 632 Bytes
Contents
module Brut::FrontEnd::HandlingResults # For use inside handle! or process! to indicate the user should be redirected to # the route for the given class and query string parameters. If the route # does not support GET, an exception is raised def redirect_to(klass, **query_string_params) if !klass.kind_of?(Class) raise ArgumentError,"redirect_to should be given a Class, not a #{klass.class}" end Brut.container.routing.uri(klass,with_method: :get,**query_string_params) end # For use when an HTTP status code must be returned. def http_status(number) = Brut::FrontEnd::HttpStatus.new(number) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
brut-0.0.1 | lib/brut/front_end/handling_results.rb |