Sha256: 50e887fbb8c730efaf757e8a07fd28694442ddf5f98ea4997f5561129865dd57
Contents?: true
Size: 969 Bytes
Versions: 16
Compression:
Stored size: 969 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) @options = options @collection = collection || model @token = stored_token if Snaptable.use_permission end def options @options end def url :id end def table_name self.class.name.underscore end def paginate_key "#{table_name}_page" 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
16 entries across 16 versions & 1 rubygems