From e8e5f7033c65c622162599fc506ff8bfb7828d83 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 6 Nov 2014 12:44:57 +1100 Subject: [PATCH] Improve all the syntax --- .../controllers/checkout/checkout_controller.js.coffee | 2 +- app/views/checkout/_form.html.haml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/darkswarm/controllers/checkout/checkout_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/checkout/checkout_controller.js.coffee index 9c953c4f4a..11f65fe358 100644 --- a/app/assets/javascripts/darkswarm/controllers/checkout/checkout_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/checkout/checkout_controller.js.coffee @@ -15,7 +15,7 @@ Darkswarm.controller "CheckoutCtrl", ($scope, storage, Checkout, CurrentUser, Cu $scope.order = Checkout.order # Ordering is important $scope.secrets = Checkout.secrets - $scope.enabled = if CurrentUser then true else false + $scope.enabled = !!CurrentUser $scope.purchase = (event)-> event.preventDefault() diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index 91153bdb4b..af81993fb0 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -7,10 +7,10 @@ = inject_available_shipping_methods = inject_available_payment_methods - = render partial: "checkout/details", locals: {f: f} - = render partial: "checkout/billing", locals: {f: f} - = render partial: "checkout/shipping", locals: {f: f} - = render partial: "checkout/payment", locals: {f: f} + = render "checkout/details", f: f + = render "checkout/billing", f: f + = render "checkout/shipping", f: f + = render "checkout/payment", f: f %p %button.button.primary{type: :submit, "ng-disabled" => "checkout.$invalid"}