Sha256: 36af2318fc07b94c00127602aa1631332de5dcf8d971b45b83b81dd487061212

Contents?: true

Size: 808 Bytes

Versions: 7

Compression:

Stored size: 808 Bytes

Contents

require 'csv'
require_dependency "brightcontent/application_controller"

module Brightcontent
  class BaseController < ApplicationController
    inherit_resources
    helper_method :scopes_configuration
    respond_to :all

    include DefaultActions
    include Pagination

    # Temp until inherent resources supports strong params
    include StrongParamsFix

    private

    def list_fields
      default_fields - %w{attachments}
    end
    helper_method :list_fields

    def form_fields
      default_fields
    end
    helper_method :form_fields

    def default_fields
      resource_class.brightcontent_columns - %w{id created_at updated_at password_digest}
    end
    helper_method :default_fields

    def resource_params
      params.require(resource_instance_name).permit!
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brightcontent-core-2.0.30 app/controllers/brightcontent/base_controller.rb
brightcontent-core-2.0.29 app/controllers/brightcontent/base_controller.rb
brightcontent-core-2.0.28 app/controllers/brightcontent/base_controller.rb
brightcontent-core-2.0.27 app/controllers/brightcontent/base_controller.rb
brightcontent-core-2.0.26 app/controllers/brightcontent/base_controller.rb
brightcontent-core-2.0.25 app/controllers/brightcontent/base_controller.rb
brightcontent-core-2.0.24 app/controllers/brightcontent/base_controller.rb