aboutsummaryrefslogtreecommitdiff
path: root/app/models/govuk_guix/revision.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/govuk_guix/revision.rb')
-rw-r--r--app/models/govuk_guix/revision.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/govuk_guix/revision.rb b/app/models/govuk_guix/revision.rb
index d58e6ad..1072e0d 100644
--- a/app/models/govuk_guix/revision.rb
+++ b/app/models/govuk_guix/revision.rb
@@ -36,4 +36,12 @@ class GovukGuix::Revision < ApplicationRecord
default_scope { order(:created_at).reverse_order }
has_many :mini_environments, foreign_key: 'govuk_guix_revision_id'
+
+ def all_available_services
+ service_lists = available_services.map do |group|
+ group['services']
+ end
+
+ service_lists.flatten
+ end
end