diff options
Diffstat (limited to 'app/models/terraform/state.rb')
-rw-r--r-- | app/models/terraform/state.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/terraform/state.rb b/app/models/terraform/state.rb index 419fffcb666..7a43350971a 100644 --- a/app/models/terraform/state.rb +++ b/app/models/terraform/state.rb @@ -15,6 +15,7 @@ module Terraform has_one :latest_version, -> { ordered_by_version_desc }, class_name: 'Terraform::StateVersion', foreign_key: :terraform_state_id scope :versioning_not_enabled, -> { where(versioning_enabled: false) } + scope :ordered_by_name, -> { order(:name) } validates :project_id, presence: true validates :uuid, presence: true, uniqueness: true, length: { is: UUID_LENGTH }, |