ember 3.18 version update modifications
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Ember from 'ember'
|
||||
import layout from '../templates/components/editable-attribute'
|
||||
#NOTE: this is an aged component locked to model and name. Needs more to be used differently, and name does not reflect it's function (Benjamin: 2019-12-21)
|
||||
|
||||
export default Ember.Component.extend
|
||||
layout: layout
|
||||
@@ -22,7 +23,7 @@ export default Ember.Component.extend
|
||||
model = @get('model')
|
||||
@set 'validation_message', ''
|
||||
if validate = @get('validate')
|
||||
@set 'validation_message', 'Must be given' if validate is 'presence' and not @get('model.name')
|
||||
@set 'validation_message', 'Must be given' if validate is 'presence' and not @get("model.#{@get 'attributeName'}")
|
||||
unless @get 'validation_message'
|
||||
@set 'isEditing', false
|
||||
model.save()
|
||||
|
||||
Reference in New Issue
Block a user