I'm using Ruby on Rails and Jbuilder gem.
I'm trying to get an attribute of a point like this:
{
"point":[33,11]
}
My model are like this
class Point < ActiveRecord::Base
attr_accessible :x, :y
end
I'm trying with this, but was not successfully, it returns the point as a string and I need it as integer.
json.point "[#{point.x},#{point.y}]"
Thanks!!!!