Sha256: 79a83872520f8d196b67c2f733bd45f5e2b64868eafe7278cad5c758d69b986a
Contents?: true
Size: 717 Bytes
Versions: 1
Compression:
Stored size: 717 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 attributes cookie to be present' unless cookie && cookie[:attributes] # Cookie will still be just values here. Attributes is the first value. @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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
effective_datatables-3.0.2 | app/models/effective/effective_datatable/attributes.rb |