def set_current_tenant_through_filter
      self.class_eval do
        helper_method :current_tenant if respond_to?(:helper_method)

        private
          def set_current_tenant(current_tenant_object)
            ActsAsTenant.current_tenant = current_tenant_object
          end

          def current_tenant
            ActsAsTenant.current_tenant
          end
      end
    end
def set_current_tenant_through_filter
      self.class_eval do
        helper_method :current_tenant if respond_to?(:helper_method)

        private
          def set_current_tenant(current_tenant_object)
            ActsAsTenant.current_tenant = current_tenant_object
          end

          def current_tenant
            ActsAsTenant.current_tenant
          end
      end
    end
This method sets up a method that allows manual setting of the current_tenant. This method should
 be used in a before_action. In addition, a helper is setup that returns the current_tenant