Sha256: 81029178410e6c9e188efdf08ec215615a9482c5c2fdfbd7b7f11477e61a2f93

Contents?: true

Size: 686 Bytes

Versions: 54

Compression:

Stored size: 686 Bytes

Contents

module Effective
  module EffectiveDatatable
    module Attributes

      private

      def initial_attributes(args)
        raise "#{self.class.name}.new() expected Hash like arguments" unless args.kind_of?(Hash)
        args
      end

      def load_attributes!
        if datatables_ajax_request?
          raise 'expected cookie to be present' unless cookie
          raise 'expected attributes cookie to be present' unless cookie[:attributes]

          @attributes = cookie.delete(:attributes)
        end

        unless datatables_ajax_request?
          @attributes[:_n] ||= view.controller_path.split('/')[0...-1].join('/').presence
        end
      end

    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
effective_datatables-3.4.3 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.2 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.2 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.1 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.1 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.14 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.13 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.12 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.11 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.10 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.9 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.8 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.7 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.6 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.5 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.4 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.3 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.3.2 app/models/effective/effective_datatable/attributes.rb