how to apply view helpers to hash of arrays elements in rabl rails

90 Views Asked by At

I have the following hash ,

baz = {"adults" : 2 ,"children" : 4 ,"foos" : [{"name" : "some_name","amount" : "123.00"}]}

I want do like

attributes :adults,:children
node :foos do |foo|
  veiw_helper(foo["amount"])
end

how can I apply helper methods to internal elements of array(here "foos") , thanks in advance.

0

There are 0 best solutions below