From d87e72e32d7447aba28ef7d267ff19a1a6a6df37 Mon Sep 17 00:00:00 2001 From: Suraj Vadgama Date: Fri, 14 Dec 2018 09:49:46 +0000 Subject: [PATCH 1/2] Resolve #806 --- app/controllers/answers_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/answers_controller.rb b/app/controllers/answers_controller.rb index 96efe804..a49d03f1 100644 --- a/app/controllers/answers_controller.rb +++ b/app/controllers/answers_controller.rb @@ -14,5 +14,10 @@ def show @assessment.proposal_id ).pluck(:criterion_id, :eligible).to_h end + + respond_to do |format| + format.html { render 'errors/not_found', status: 404 } + format.js { render } + end end end From 2c7d161328893b72c6462126adbbd6c7422b1050 Mon Sep 17 00:00:00 2001 From: Suraj Vadgama Date: Fri, 14 Dec 2018 10:02:51 +0000 Subject: [PATCH 2/2] Resolve #808 and resolve #809 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- config/initializers/assets.rb | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index c8c8b3a4..3edee36e 100644 --- a/Gemfile +++ b/Gemfile @@ -43,7 +43,7 @@ gem 'sitemap_generator' gem 'stripe' # Admin -gem 'activeadmin' +gem 'activeadmin', '~> 1.3.0' gem 'devise', '~> 4.4.0' # Monitoring & metrics diff --git a/Gemfile.lock b/Gemfile.lock index ed88aa2c..f74c6c87 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -24,7 +24,7 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activeadmin (1.4.3) + activeadmin (1.3.1) arbre (>= 1.1.1) coffee-rails formtastic (~> 3.1) @@ -370,7 +370,7 @@ PLATFORMS ruby DEPENDENCIES - activeadmin + activeadmin (~> 1.3.0) activerecord-import bcrypt (~> 3.1.7) bullet diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 404b950f..5606974f 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -11,3 +11,4 @@ # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # Rails.application.config.assets.precompile += %w( search.js ) +Rails.application.config.assets.precompile += %w( chartkick.js )