Skip to content

Commit

Permalink
Fix code examples in symbol_status plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed May 13, 2016
1 parent fbba776 commit 02ac879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/roda/plugins/symbol_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ module RodaPlugins
#
# Examples:
# r.is "needs_authorization"
# response.code = :unauthorized
# response.status = :unauthorized
# end
# r.is "nothing"
# response.code = :no_content
# response.status = :no_content
# end
#
# The conversion is done through <tt>Rack::Utils.status_code</tt>.
module SymbolStatus
module ResponseMethods
# Sets the response status code by fixnum or symbol name
def status=(code)
code = Rack::Utils.status_code(code) if code.is_a? Symbol
code = Rack::Utils.status_code(code) if code.is_a?(Symbol)
super(code)
end
end
Expand Down

0 comments on commit 02ac879

Please sign in to comment.