review: move Prefillable to concern directory

This commit is contained in:
sebastiencarceles 2022-12-01 09:37:00 +01:00
parent 3939644030
commit ab30af5fe5
3 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Dossier::Prefillable
module DossierPrefillableConcern
extend ActiveSupport::Concern
def prefill!(champs_public_attributes)

View file

@ -43,11 +43,10 @@
# user_id :integer
#
class Dossier < ApplicationRecord
include Dossier::Prefillable
self.ignored_columns = [:en_construction_conservation_extension]
include DossierFilteringConcern
include DossierRebaseConcern
include DossierPrefillableConcern
enum state: {
brouillon: 'brouillon',

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
RSpec.describe Dossier::Prefillable do
RSpec.describe DossierPrefillableConcern do
describe '.prefill!' do
let(:procedure) { create(:procedure, :published) }
let(:dossier) { create(:dossier, :brouillon, procedure: procedure) }