Method: Deli::Query.build_query
- Defined in:
- lib/deli/query.rb
.build_query(params) ⇒ Object
from rack, except we don’t escape anything! keeps url’s nicely formatted… up to you to make sure you have the right input
36 37 38 39 40 41 42 43 44 |
# File 'lib/deli/query.rb', line 36 def build_query(params) params.map do |k, v| if v.class == Array build_query(v.map { |x| [k, x] }) else "#{k}=#{v}" end end.join("&").gsub(/\s+/, "+") end |