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.6.3 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.6.1 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.6.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.5.4 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.5.3 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.5.2 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.3.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.5.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.2.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.8 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.1.1 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.7 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.1.0 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.6 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.6 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.5 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.5 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.4 app/models/effective/effective_datatable/attributes.rb
effective_datatables-3.4.4 app/models/effective/effective_datatable/attributes.rb
effective_datatables-4.0.3 app/models/effective/effective_datatable/attributes.rb