Hi All,
I'm working with a list of assets, sorted alphabetically (through another method). I would like to assign a value to the "position" key, which essentially just says where this particular asset appears in the ordered list of all assets. Here is the code I'm working with now (:position left blank on purpose):
@active_resources.each do |asset|
@asset_data[asset.id] = {
:name => asset.name,
:services => asset.active_services.collect{|service|
{:duration => service.duration, :name => service.name, :id => service.id}
},
:position =>
}
end
Thank you in advance.