Adapt retire form to include needed translations and move validations from controller to model. Also change sanitizable concern to sanitize not marked for destruction translations.
18 lines
383 B
Ruby
18 lines
383 B
Ruby
class AddProposalsTranslations < ActiveRecord::Migration[4.2]
|
|
def self.up
|
|
Proposal.create_translation_table!(
|
|
{
|
|
title: :string,
|
|
description: :text,
|
|
summary: :text,
|
|
retired_explanation: :text
|
|
},
|
|
{ migrate_data: true }
|
|
)
|
|
end
|
|
|
|
def self.down
|
|
Proposal.drop_translation_table!
|
|
end
|
|
end
|