Skip to content

Instantly share code, notes, and snippets.

@avidas
Last active December 26, 2017 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avidas/0a3a20abf0cb681fd36f6f7b7605478c to your computer and use it in GitHub Desktop.
Save avidas/0a3a20abf0cb681fd36f6f7b7605478c to your computer and use it in GitHub Desktop.
begin
TenantService.switch_to_rest_of_world_tenant
account = Account.find_by_short_code('HUJW06')
raise 'Incorrect Account' unless account.name == 'Shopic'
location = Location.find(98)
raise 'Incorrect Location' unless location.name == 'Ibn Gabirol'
prs = account.primary_reservations.active.select { |res| res.location_id == location.id }
prs.map{ |res| res.update_attributes(annual_escalator_rate: nil, escalation_date: nil) }
end
@ianguffy
Copy link

👍

@jhjwind
Copy link

jhjwind commented Dec 26, 2017

👍

@jhjwind
Copy link

jhjwind commented Dec 26, 2017

line 20 = should be ==

@sagross
Copy link

sagross commented Dec 26, 2017

👍

@jhjwind
Copy link

jhjwind commented Dec 26, 2017

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment