class Administrate::Page::Collection
Public Instance Methods
attribute_names()
click to toggle source
# File lib/administrate/page/collection.rb, line 6 def attribute_names dashboard.collection_attributes end
attribute_types()
click to toggle source
# File lib/administrate/page/collection.rb, line 16 def attribute_types dashboard.attribute_types_for(attribute_names) end
attributes_for(resource)
click to toggle source
# File lib/administrate/page/collection.rb, line 10 def attributes_for(resource) attribute_names.map do |attr_name| attribute_field(dashboard, resource, attr_name, :index) end end
order_params_for(attr, key: resource_name)
click to toggle source
# File lib/administrate/page/collection.rb, line 26 def order_params_for(attr, key: resource_name) { key => order.order_params_for(attr) } end
ordered_html_class(attr)
click to toggle source
# File lib/administrate/page/collection.rb, line 20 def ordered_html_class(attr) ordered_by?(attr) && order.direction end
Private Instance Methods
order()
click to toggle source
# File lib/administrate/page/collection.rb, line 32 def order options[:order] || Order.new end