Sha256: 3540e3bb375917500ad4269ad4bb1008b66ce473cbdd6ff5de0e91a9ffa8e896

Contents?: true

Size: 817 Bytes

Versions: 23

Compression:

Stored size: 817 Bytes

Contents

require 'snaptable/constructor/sortable'
require 'snaptable/constructor/collection'
require 'snaptable/constructor/renderer'

module Snaptable
  module Constructor

      class BaseTable < SimpleDelegator
        include Sortable
        include Collection
        include Renderer

        def initialize(parent, collection = nil, options = {})
          super(parent)
          @collection = collection
          @options = options
          @token = stored_token if Snaptable.use_permission
        end

        def options
          @options
        end

        def url
          :id
        end

        private

        def stored_token
          session[:token] = params[:token] if params[:token]
          return session[:token]
        end
      end

  end
end

BaseTable = Snaptable::Constructor::BaseTable

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
snaptable-1.1.0 lib/snaptable/constructor/base_table.rb
snaptable-1.0.0 lib/snaptable/constructor/base_table.rb
snaptable-0.9.3 lib/snaptable/constructor/base_table.rb
snaptable-0.9.2 lib/snaptable/constructor/base_table.rb
snaptable-0.9.1 lib/snaptable/constructor/base_table.rb
snaptable-0.9.0 lib/snaptable/constructor/base_table.rb
snaptable-0.8.6 lib/snaptable/constructor/base_table.rb
snaptable-0.8.5 lib/snaptable/constructor/base_table.rb
snaptable-0.8.4 lib/snaptable/constructor/base_table.rb
snaptable-0.8.3 lib/snaptable/constructor/base_table.rb
snaptable-0.8.2 lib/snaptable/constructor/base_table.rb
snaptable-0.8.1 lib/snaptable/constructor/base_table.rb
snaptable-0.8.0 lib/snaptable/constructor/base_table.rb
snaptable-0.7.0 lib/snaptable/constructor/base_table.rb
snaptable-0.6.4 lib/snaptable/constructor/base_table.rb
snaptable-0.6.3 lib/snaptable/constructor/base_table.rb
snaptable-0.6.1 lib/snaptable/constructor/base_table.rb
snaptable-0.6.0 lib/snaptable/constructor/base_table.rb
snaptable-0.5.1 lib/snaptable/constructor/base_table.rb
snaptable-0.5.0 lib/snaptable/constructor/base_table.rb