Skip to content

Instantly share code, notes, and snippets.

@jeffdeville
Created April 25, 2012 15:09
Show Gist options
  • Select an option

  • Save jeffdeville/2490458 to your computer and use it in GitHub Desktop.

Select an option

Save jeffdeville/2490458 to your computer and use it in GitHub Desktop.
Suspend properties with no geocoordinates, and tag them w/ the mixin no_location
mixin = InventoryMixin.find(776)
Inventory.not_geocoded.where(:property_management_company_id => 154).each do |inv|
inv.mixins << mixin
inv.status = "suspended"
inv.save!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment