1
0

Allow binding goal saving w/o exposures and disallow destruction

This commit is contained in:
cryptogopher
2020-08-22 23:17:24 +02:00
parent 8f0e718b4a
commit cf0e14d87d
6 changed files with 51 additions and 33 deletions

View File

@@ -31,7 +31,7 @@ module BodyTracking::ProjectPatch
has_many :goals, dependent: :destroy do
def binding
find_or_initialize_by(is_binding: true) do |goal|
find_or_create_by(is_binding: true) do |goal|
goal.name = I18n.t('targets.form.binding_goal')
end
end