Here is my concern file: controllerconcerns.rb
require 'active_support/concern'
module Query_scopes
extend ActiveSupport::Concern
has_scope :title
end
Here is my controller I want to include it in: api_controller.rb
class ApiController < ApplicationController
require 'concerns/controllerconcerns'
include Query_scopes
etc etc etc
Here is the error I'm getting:
undefined method `has_scope' for Query_scopes:Module
I have the has_scope gem installed and it works fine if I just say 'has_scope: scopename'
within each individual controller I want it applied to... so how can I apply a few lines of 'has_scope' code to all my controllers?