Refactor javascript to coffee

This commit is contained in:
Martin Lensment 2015-01-30 12:07:47 +02:00
parent 65d849cc36
commit 8275123037
4 changed files with 9 additions and 14 deletions

View file

@ -19,10 +19,8 @@
= status_fields.label :description, class: 'col-md-2 control-label'
.col-md-10
= status_fields.text_field :description, class: 'form-control', autocomplete: 'off'
:javascript
$("#domain-statuses").nestedAttributes({
bindAddTo: $(".add-domain-status"),
afterAdd: function(item) {
item.find('.errors').html('');
}
});
:coffee
$("#domain-statuses").nestedAttributes
bindAddTo: $(".add-domain-status")
afterAdd: (item) ->
item.find(".errors").html ""