Class: Array
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#to_param ⇒ Object
40 41 42 |
# File 'lib/mini_apivore/to_param.rb', line 40 def to_param collect(&:to_param).join "/" end |
#to_query(key) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/mini_apivore/to_param.rb', line 48 def to_query(key) prefix = "#{key}[]" if empty? nil.to_query(prefix) else collect { |value| value.to_query(prefix) }.join "&" end end |