1
0

Added is_binding attribute to Goal

Fixed test_index to check for data rows only
This commit is contained in:
cryptogopher
2020-08-18 17:40:46 +02:00
parent 955125b843
commit 59a14043c8
13 changed files with 43 additions and 21 deletions

View File

@@ -31,7 +31,7 @@ module BodyTracking::ProjectPatch
has_many :goals, dependent: :destroy do
def binding
find_or_create_by(name: "- binding -")
find_or_initialize_by(is_binding: true) { |g| g.name = "- binding -" }
end
end
has_many :targets, through: :goals