Sha256: 0e1a7f2dd8b68ec3fbde49914a8d8627589654e93ee355682596b7033831754e

Contents?: true

Size: 663 Bytes

Versions: 10

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Admin
    class NodesController < Admin::ResourcesController
      def index
        @root_nodes = Node.language_root_nodes
      end

      def new
        @node = Node.new(
          site: Alchemy::Site.current,
          parent_id: params[:parent_id],
          language: Language.current
        )
      end

      private

      def resource_params
        params.require(:node).permit(
          :site_id,
          :parent_id,
          :language_id,
          :page_id,
          :name,
          :url,
          :title,
          :nofollow,
          :external
        )
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-4.6.7 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.6 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.5 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.5.1 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.4 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.3 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.2 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.1 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.6.0 app/controllers/alchemy/admin/nodes_controller.rb
alchemy_cms-4.5.0 app/controllers/alchemy/admin/nodes_controller.rb