Verified Commit 0002d735 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

ransackable scope stuff

parent e4045bae
......@@ -5,8 +5,6 @@ class Client < ApplicationRecord
include ZuerichScopes
include ImportRelation
ransackable_scopes [:active, :inactive]
before_update :record_acceptance_change, if: :going_to_change_to_resigned?
enum acceptance: { accepted: 0, rejected: 1, resigned: 2 }
......@@ -110,13 +108,11 @@ class Client < ApplicationRecord
language_skills.german.blank?
end
# allow ransack to use the scopes
def self.ransackable_scopes(_auth_object = nil)
# allow ransack to use defined scopes
def self.ransackable_scopes(auth_object = nil)
['active', 'inactive']
end
private_class_method :ransackable_scopes
private
def going_to_change_to_resigned?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment