Class: Organizations::UserOrganizationsFinder
- Inherits:
-
OrganizationsFinder
- Object
- OrganizationsFinder
- Organizations::UserOrganizationsFinder
- Defined in:
- app/finders/organizations/user_organizations_finder.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(current_user, target_user, params = {}) ⇒ UserOrganizationsFinder
constructor
A new instance of UserOrganizationsFinder.
Constructor Details
#initialize(current_user, target_user, params = {}) ⇒ UserOrganizationsFinder
Returns a new instance of UserOrganizationsFinder.
5 6 7 8 9 |
# File 'app/finders/organizations/user_organizations_finder.rb', line 5 def initialize(current_user, target_user, params = {}) super(current_user, params) @target_user = target_user end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 |
# File 'app/finders/organizations/user_organizations_finder.rb', line 11 def execute return Organizations::Organization.none unless can_read_user_organizations? return Organizations::Organization.none if target_user.blank? super end |