Method: Slick::Util.paramify
- Defined in:
- lib/slick/util.rb
.paramify(hashable) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/slick/util.rb', line 40 def paramify(hashable) if hashable.kind_of?(Hash) out = ParamsHash.new hashable.each{|name, value| out[name] = paramify(value)} out elsif hashable.kind_of?(Array) out = ParamsHash.new hashable.each_with_index{|value, index| out[index] = paramify(value)} out else return hashable end end |