Class: Crm::ContactsFinder
- Inherits:
-
Object
- Object
- Crm::ContactsFinder
- Includes:
- Gitlab::Allowable, Gitlab::Utils::StrongMemoize
- Defined in:
- app/finders/crm/contacts_finder.rb
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(current_user, params = {}) ⇒ ContactsFinder
constructor
A new instance of ContactsFinder.
Methods included from Gitlab::Utils::StrongMemoize
#clear_memoization, #strong_memoize, #strong_memoized?
Methods included from Gitlab::Allowable
Constructor Details
#initialize(current_user, params = {}) ⇒ ContactsFinder
Returns a new instance of ContactsFinder.
16 17 18 19 |
# File 'app/finders/crm/contacts_finder.rb', line 16 def initialize(current_user, params = {}) @current_user = current_user @params = params end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
14 15 16 |
# File 'app/finders/crm/contacts_finder.rb', line 14 def current_user @current_user end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
14 15 16 |
# File 'app/finders/crm/contacts_finder.rb', line 14 def params @params end |
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 |
# File 'app/finders/crm/contacts_finder.rb', line 21 def execute return CustomerRelations::Contact.none unless root_group root_group.contacts end |