Guest User

Untitled

a guest
Feb 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #replaces CGI.unescape with URI.unescape to prevent unescaping '+' to ' ' in path elements
  2.  
  3. module ActionController
  4. module Routing
  5. class DynamicComponent
  6. def assign_result(g, with_default = false)
  7. g.result key, "URI.unescape(#{g.next_segment(true, with_default ? default : nil)})"
  8. g.move_forward {|gp| yield gp}
  9. end
  10. end
  11. end
  12. end
Add Comment
Please, Sign In to add comment