Open dawsmith8 opened 11 years ago
To set a State this syntax is required:
"State" => "/state/" It would be convenient if a name can be used instead.
It is possible to query State, create a hash, and populate the hash with the query results, where State Name is the key and State _ref is the value:
state_results.each do |s| s.read state_hash[s["Name"]] = s["_ref"] end Then we can update a State:
features.each do |f| field_updates={"State" => state_hash["Developing"]} f.update(field_updates) end
A convenience method to make this transparent for the users would be nice.
To set a State this syntax is required:
"State" => "/state/"
It would be convenient if a name can be used instead.
It is possible to query State, create a hash, and populate the hash with the query results, where State Name is the key and State _ref is the value:
state_results.each do |s| s.read state_hash[s["Name"]] = s["_ref"] end Then we can update a State:
features.each do |f| field_updates={"State" => state_hash["Developing"]} f.update(field_updates) end
A convenience method to make this transparent for the users would be nice.