From b783c8b6b21eac1c25148c39953c4a3e6ec6362d Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Thu, 24 Mar 2016 10:17:45 +0800 Subject: [PATCH 1/2] remove cancan --- Gemfile | 1 - Gemfile.lock | 2 -- 2 files changed, 3 deletions(-) diff --git a/Gemfile b/Gemfile index bf5997af..497172e4 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,6 @@ gem 'devise' gem 'redis' gem 'pg' gem 'pundit' -gem 'cancan' gem 'pundit_extra' gem 'formula' gem 'formtastic' diff --git a/Gemfile.lock b/Gemfile.lock index ff5c1317..c0b0840f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,6 @@ GEM debug_inspector (>= 0.0.1) builder (3.2.2) byebug (8.2.2) - cancan (1.6.10) cancancan (1.10.1) climate_control (0.0.3) activesupport (>= 3.0) @@ -265,7 +264,6 @@ DEPENDENCIES best_in_place better_errors binding_of_caller - cancan coffee-rails delayed_job (~> 4.0.2) delayed_job_active_record (~> 4.0.1) From 50547734730f44037ff692d76f89ad1dc55cd985 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Thu, 24 Mar 2016 10:30:10 +0800 Subject: [PATCH 2/2] this seems to fix the uninitialized constant error --- app/controllers/api/restful_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/restful_controller.rb b/app/controllers/api/restful_controller.rb index 06396e3d..8ef6d6cd 100644 --- a/app/controllers/api/restful_controller.rb +++ b/app/controllers/api/restful_controller.rb @@ -1,3 +1,5 @@ +require 'cancancan' + class API::RestfulController < ActionController::Base include Pundit include PunditExtra