Allows to define custom class name in CoffeeScript when frontend and backend class names don't match
This commit is contained in:
parent
ebe4746ace
commit
14dfdb4db9
2 changed files with 5 additions and 3 deletions
|
@ -806,7 +806,7 @@ set new attributes of model (remove already available attributes)
|
|||
type: 'GET'
|
||||
url: "#{@apiPath}/tags"
|
||||
data:
|
||||
object: @.className
|
||||
object: @serverClassName || @className
|
||||
o_id: id
|
||||
processData: true
|
||||
success: (data, status, xhr) ->
|
||||
|
@ -818,7 +818,7 @@ set new attributes of model (remove already available attributes)
|
|||
type: 'GET'
|
||||
url: "#{@apiPath}/tags/add"
|
||||
data:
|
||||
object: @.className
|
||||
object: @serverClassName || @className
|
||||
o_id: id
|
||||
item: item
|
||||
processData: true
|
||||
|
@ -829,7 +829,7 @@ set new attributes of model (remove already available attributes)
|
|||
type: 'GET'
|
||||
url: "#{@apiPath}/tags/remove"
|
||||
data:
|
||||
object: @.className
|
||||
object: @serverClassName || @className
|
||||
o_id: id
|
||||
item: item
|
||||
processData: true
|
||||
|
|
|
@ -4,6 +4,8 @@ class App.KnowledgeBaseAnswer extends App.Model
|
|||
@extend App.KnowledgeBaseActions
|
||||
@extend App.KnowledgeBaseCanBePublished
|
||||
|
||||
@serverClassName: 'KnowledgeBase::Answer'
|
||||
|
||||
url: ->
|
||||
@knowledge_base().generateURL('answers')
|
||||
|
||||
|
|
Loading…
Reference in a new issue