Sha256: bfe45630aea91ba80385ace39818b1fe90b2bc9d359ae6c0d3d2aa92a18aefe3

Contents?: true

Size: 864 Bytes

Versions: 17

Compression:

Stored size: 864 Bytes

Contents

# frozen_string_literal: true

class Comfy::Admin::Cms::Revisions::PageController < Comfy::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 "comfy/admin/cms/revisions/show"
  end

private

  def load_record
    @record = @site.pages.find(params[:page_id])
  rescue ActiveRecord::RecordNotFound
    flash[:danger] = I18n.t("comfy.admin.cms.revisions.record_not_found")
    redirect_to comfy_admin_cms_site_pages_path(@site)
  end

  def record_path
    edit_comfy_admin_cms_site_page_path(@site, @record)
  end

end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
comfortable_mexican_sofa-2.0.19 app/controllers/comfy/admin/cms/revisions/page_controller.rb
PixelForce_ETS-0.0.2 app/controllers/comfy/admin/cms/revisions/page_controller.rb
PixelForce_ETS-0.0.1 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcyEtsTest2-0.0.4 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcyEtsTest2-0.0.3 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcyEtsTest2-0.0.2 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcyEtsTest2-0.0.1 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcyEtsTest-0.0.1 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcyEtsTest-2.2.19 app/controllers/comfy/admin/cms/revisions/page_controller.rb
ComfortableMexicanSofa-2.0.18 app/controllers/comfy/admin/cms/revisions/page_controller.rb
kcy1-1.0 app/controllers/comfy/admin/cms/revisions/page_controller.rb
comfortable_mexican_sofa-2.0.18 app/controllers/comfy/admin/cms/revisions/page_controller.rb
comfortable_mexican_sofa-2.0.17 app/controllers/comfy/admin/cms/revisions/page_controller.rb
comfortable_mexican_sofa-2.0.16 app/controllers/comfy/admin/cms/revisions/page_controller.rb
comfortable_mexican_sofa-2.0.15 app/controllers/comfy/admin/cms/revisions/page_controller.rb
comfortable_mexican_sofa-2.0.14 app/controllers/comfy/admin/cms/revisions/page_controller.rb
comfortable_mexican_sofa-2.0.13 app/controllers/comfy/admin/cms/revisions/page_controller.rb