Sha256: f5f8f7fe765714e17c10d1a505728c5845e35a257513d2b0c64491c3b2a9fa38

Contents?: true

Size: 722 Bytes

Versions: 47

Compression:

Stored size: 722 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Admin
    module ArchiveOverlay
      # Sets assignable id on given form field via JS.
      #
      # When the user saves the model the assignable
      # gets persisted with the model as well.
      #
      def assign
        @assignable_id = params[:id]
        @form_field_id = params[:form_field_id]
      end

      private

      def in_overlay?
        params[:form_field_id].present?
      end

      def archive_overlay
        @form_field_id = params[:form_field_id]

        respond_to do |format|
          format.html { render partial: "archive_overlay" }
          format.js { render action: "archive_overlay" }
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
alchemy_cms-7.3.4 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.3.3 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.3.2 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.7 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.3.1 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.3.0 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.6 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.5 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.1.12 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.0.15 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.4 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.1.11 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.3 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.1.10 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.2 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.1.9 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.0.14 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.2.1 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.0.13 app/controllers/concerns/alchemy/admin/archive_overlay.rb
alchemy_cms-7.1.8 app/controllers/concerns/alchemy/admin/archive_overlay.rb