Sha256: 80bb8cb8c095c01594ac83aa4ea4ca5e919a46f9410810c5add3b74487498a8b
Contents?: true
Size: 957 Bytes
Versions: 1
Compression:
Stored size: 957 Bytes
Contents
# frozen_string_literal: true class Occams::Admin::Cms::Revisions::TranslationController < Occams::Admin::Cms::Revisions::BaseController def show @current_content = @record.fragments.each_with_object({}) do |b, c| c[b.identifier] = b.content end @versioned_content = @record.fragments.each_with_object({}) do |b, c| d = @revision.data["fragments_attributes"].detect { |r| r[:identifier] == b.identifier } c[b.identifier] = d.try(:[], :content) end render "occams/admin/cms/revisions/show" end private def load_record @page = @site.pages.find(params[:page_id]) @record = @page.translations.find(params[:translation_id]) rescue ActiveRecord::RecordNotFound flash[:danger] = I18n.t("occams.admin.cms.revisions.record_not_found") redirect_to occams_admin_cms_site_pages_path(@site) end def record_path edit_occams_admin_cms_site_page_translation_path(@site, @page, @record) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
occams-1.0.1 | app/controllers/occams/admin/cms/revisions/translation_controller.rb |