Sha256: eb9fccab75f2de10493a0d7ea0c7bbd310d60f34ab1eb89d48d33e7a519ca36f

Contents?: true

Size: 559 Bytes

Versions: 4

Compression:

Stored size: 559 Bytes

Contents

module Spree
  module Admin
    class QuestionCategoriesController < ResourceController
      before_filter :question_category, only: [:new, :edit]

      private

      def question_category
        @question_category ||= @object
      end

      def safe_params
        [
          :questions_attributes,
          :question,
          :answer,
          question: [:question_category_id, :question, :answer]
        ]
      end

      def question_category_params
        params.require(:question_category).permit(*safe_params)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree-faq-2.4.0 app/controllers/spree/admin/question_categories_controller.rb
spree-faq-2.3.0 app/controllers/spree/admin/question_categories_controller.rb
spree-faq-2.2.1 app/controllers/spree/admin/question_categories_controller.rb
spree-faq-2.1.1 app/controllers/spree/admin/question_categories_controller.rb