local cleanup

This commit is contained in:
Andrew Brown 2018-01-19 21:42:44 -06:00
parent 71fcf17e16
commit 81e0f5797a
4 changed files with 7 additions and 4 deletions

1
.tool-versions Normal file
View File

@ -0,0 +1 @@
ruby 2.3.0

View File

@ -0,0 +1,2 @@
module EmergencyHelper
end

View File

@ -11,7 +11,7 @@ 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
@ -19,6 +19,6 @@ class Fathership < ActiveRecord::Base
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

View File

@ -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