Sha256: f10a7ecfa039f6cabc1e56057457b3b9730dd723f612b38fe74368d618fecd6b
Contents?: true
Size: 676 Bytes
Versions: 19
Compression:
Stored size: 676 Bytes
Contents
require_relative "base" module Administrate module Page class Collection < Page::Base def attribute_names dashboard.collection_attributes end def attributes_for(resource) attribute_names.map do |attr_name| attribute_field(dashboard, resource, attr_name, :index) end end def attribute_types dashboard.attribute_types_for(attribute_names) end def ordered_html_class(attr) ordered_by?(attr) && order.direction end delegate :ordered_by?, :order_params_for, to: :order private def order options[:order] || Order.new end end end end
Version data entries
19 entries across 19 versions & 2 rubygems