1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-12 23:09:03 +01:00
fab-manager/app/models/project_step.rb

11 lines
374 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# ProjectStep is a detail in the documentation of a Project.
2020-03-25 10:16:47 +01:00
class ProjectStep < ApplicationRecord
belongs_to :project, touch: true
has_many :project_step_images, as: :viewable, dependent: :destroy
accepts_nested_attributes_for :project_step_images, allow_destroy: true, reject_if: :all_blank
2023-06-30 11:15:37 +02:00
default_scope -> { order(:step_nb) }
2015-05-05 03:10:25 +02:00
end