Class: Arbre::HTML::Table

Inherits:
Tag show all
Defined in:
lib/active_admin/arbre/html/html5_elements.rb

Direct Known Subclasses

ActiveAdmin::Views::TableFor

Instance Attribute Summary

Attributes inherited from Tag

#attributes

Attributes inherited from Element

#children, #parent

Instance Method Summary collapse

Methods inherited from Tag

#add_class, #build, #class_list, #class_names, #get_attribute, #has_attribute?, #id, #id!, #id=, #remove_attribute, #remove_class, #set_attribute, #to_s

Methods inherited from Element

#+, #<<, #add_child, #assigns, #build, builder_method, #content, #content=, #document, #each, #get_elements_by_class_name, #get_elements_by_tag_name, #helpers, #html_safe, #indent_level, #parent?, #remove_child, #tag_name, #to_ary, #to_s, #to_str

Methods included from Builder::BuilderMethods

#append_return_block, #build_tag, #current_dom_context, #insert_tag, #with_current_dom_context

Methods included from Builder

#current_dom_context, #helpers, #method_missing

Constructor Details

#initializeTable

Returns a new instance of Table.



31
32
33
34
# File 'lib/active_admin/arbre/html/html5_elements.rb', line 31

def initialize(*)
  super
  set_table_tag_defaults
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Arbre::Builder

Instance Method Details

#set_table_tag_defaultsObject (protected)

Set some good defaults for tables



39
40
41
42
43
# File 'lib/active_admin/arbre/html/html5_elements.rb', line 39

def set_table_tag_defaults
  set_attribute :border,      0
  set_attribute :cellspacing, 0
  set_attribute :cellpadding, 0
end