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

16 lines
317 B
Ruby
Raw Normal View History

# 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