Skip to content

Commit

Permalink
local cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
drusepth committed Jan 20, 2018
1 parent 71fcf17 commit 81e0f57
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 2.3.0
2 changes: 2 additions & 0 deletions app/helpers/emergency_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module EmergencyHelper
end
4 changes: 2 additions & 2 deletions app/models/content_groupers/fathership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class Fathership < ActiveRecord::Base
other_object = Character.find_by(id: self.father_id)

# If this character is marked as the father of another character, we should mark that character as a child of this character
other_object.childrenships.create(character: other_object, child: this_object) unless other_object.children.include? this_object
other_object.childrenships.create(character: other_object, child: this_object) unless other_object.children.include?(this_object)
end

after_destroy do
# This is a two-way relation, so we should also delete the reverse association
this_object = Character.find_by(id: self.character_id)
other_object = Character.find_by(id: self.father_id)

other_object.children.delete this_object
other_object.children.delete(this_object)
end
end
4 changes: 2 additions & 2 deletions docs/db_upgrade_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ heroku addons:create heroku-postgresql:premium-0 --app production-1
heroku pg:wait --app production-1

heroku maintenance:on --app production-1
heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_IVORY_URL --app production-1
heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_COBALT_URL --app production-1

heroku pg:promote HEROKU_POSTGRESQL_IVORY_URL --app production-1
heroku pg:promote HEROKU_POSTGRESQL_COBALT_URL --app production-1

git push heroku master
heroku maintenance:off --app production-1

0 comments on commit 81e0f57

Please sign in to comment.