1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/services/group_service.rb

16 lines
317 B
Ruby

# frozen_string_literal: true
# Provides methods for Groups
class GroupService
def self.list(filters = {})
groups = Group.where(nil)
if filters[:disabled].present?
state = filters[:disabled] == 'false' ? [nil, false] : true
groups = groups.where(disabled: state)
end
groups
end
end