Class: EgovUtils::RefreshUserGroups
- Inherits:
-
Object
- Object
- EgovUtils::RefreshUserGroups
- Defined in:
- app/services/egov_utils/refresh_user_groups.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(user) ⇒ RefreshUserGroups
constructor
A new instance of RefreshUserGroups.
Constructor Details
#initialize(user) ⇒ RefreshUserGroups
Returns a new instance of RefreshUserGroups.
4 5 6 |
# File 'app/services/egov_utils/refresh_user_groups.rb', line 4 def initialize(user) @user = user end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 |
# File 'app/services/egov_utils/refresh_user_groups.rb', line 8 def call group_ids = (current_non_ldap_groups + ldap_groups).compact.map(&:id) user.group_ids = group_ids user end |