From a600838c5013f2b9673196ff5b96588a22c9cafb Mon Sep 17 00:00:00 2001 From: Phyo Date: Thu, 15 Jun 2017 11:05:13 +0630 Subject: [PATCH] Bug Fix with Production --- app/assets/javascripts/origami.js | 9 +++++---- config/environments/production.rb | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/origami.js b/app/assets/javascripts/origami.js index 4a7e3d50..e2e6e319 100644 --- a/app/assets/javascripts/origami.js +++ b/app/assets/javascripts/origami.js @@ -11,6 +11,7 @@ // about supported directives. // //= require jquery +//= require tether //= require bootstrap //= require jquery_ujs //= require turbolinks @@ -26,7 +27,7 @@ $(document).ready(function(){ // For selected order return var order_status = ""; - order_status = $(".selected-item").children().find(".orders-order-status").text().substr(0,6).trim(); + order_status = $(".selected-item").children().find(".orders-order-status").text().substr(0,6).trim(); // Enable/Disable Button control_button(order_status); @@ -220,7 +221,7 @@ $(document).ready(function(){ if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){ var balance = data["response_data"]["data"][i]["balance"]; if (data["response_data"]["status"]==true) { - $('.rebate_amount').removeClass('hide'); + $('.rebate_amount').removeClass('hide'); row = '' + data["response_data"]["data"][i]["accountable_type"] +'' +'' + balance + ''; @@ -290,8 +291,8 @@ $(document).ready(function(){ }); /* Button Control by Status */ -function control_button(order_status){ - if(order_status=="billed"){ +function control_button(order_status){ + if(order_status=="billed"){ $("#customer").prop('disabled', false); $("#request_bills").prop('disabled', true); $("#discount").prop('disabled', false); diff --git a/config/environments/production.rb b/config/environments/production.rb index 5aa66a01..0dac3e0e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -8,11 +8,12 @@ Rails.application.configure do # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. - config.eager_load = true + config.eager_load = false # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true + config.serve_staitc_assets = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. @@ -23,7 +24,7 @@ Rails.application.configure do # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false + config.assets.compile = true # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb