diff --git a/app/views/admin/api_users/_form.haml b/app/views/admin/api_users/_form.haml index 6ed4ac1c3..724c3a650 100644 --- a/app/views/admin/api_users/_form.haml +++ b/app/views/admin/api_users/_form.haml @@ -36,5 +36,5 @@ .col-md-12.text-right = button_tag(t('save'), class: 'btn btn-primary') -:javascript +:coffee Autocomplete.bindAdminRegistrarSearch(); diff --git a/app/views/admin/domains/_form.haml b/app/views/admin/domains/_form.haml index 49a371601..d6421e93b 100644 --- a/app/views/admin/domains/_form.haml +++ b/app/views/admin/domains/_form.haml @@ -16,7 +16,6 @@ .col-md-12.text-right = button_tag(t('save'), class: 'btn btn-primary') -:javascript - $(function() { - $('#tabs a:first').tab('show') - }) +:coffee + $ -> + $("#tabs a:first").tab "show" diff --git a/app/views/admin/domains/form_partials/_statuses.haml b/app/views/admin/domains/form_partials/_statuses.haml index bbf21647b..a2354343b 100644 --- a/app/views/admin/domains/form_partials/_statuses.haml +++ b/app/views/admin/domains/form_partials/_statuses.haml @@ -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 "" diff --git a/spec/models/registrar_spec.rb b/spec/models/registrar_spec.rb index 40b243fc1..723dfda82 100644 --- a/spec/models/registrar_spec.rb +++ b/spec/models/registrar_spec.rb @@ -30,7 +30,5 @@ describe Registrar do @registrar.errors[:email].should == ['is invalid'] @registrar.errors[:billing_email].should == ['is invalid'] end - - end end