Make Legislation Draft Versions translatable

This commit is contained in:
Marko Lovic
2018-08-12 21:43:47 +02:00
committed by Javi Martín
parent 06347062dd
commit 05bfa193cd
6 changed files with 201 additions and 22 deletions

View File

@@ -1,6 +1,8 @@
class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseController
load_and_authorize_resource :process, class: "Legislation::Process"
load_and_authorize_resource :draft_version, class: "Legislation::DraftVersion", through: :process
include Translatable
load_and_authorize_resource :draft_version, class: "Legislation::DraftVersion", through: :process, prepend: true
load_and_authorize_resource :process, class: "Legislation::Process", prepend: true
def index
@draft_versions = @process.draft_versions
@@ -44,7 +46,12 @@ class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseCont
:status,
:final_version,
:body,
:body_html
:body_html,
*translation_params(Legislation::DraftVersion)
)
end
def resource
@draft_version
end
end