lib/active_admin/views/components/columns.rb in andrewroth_activeadmin-0.3.4.3 vs lib/active_admin/views/components/columns.rb in andrewroth_activeadmin-0.3.4.4
- old
+ new
@@ -12,10 +12,14 @@
def add_child(*)
super
calculate_columns!
end
+ def to_s
+ super.to_s + "<div style=\"clear:both;\"></div>".html_safe
+ end
+
protected
def margin_size
2
end
@@ -31,13 +35,9 @@
children.each_with_index do |col, i|
col.set_attribute :style, "width: #{column_width}%;"
col.attr(:style) << " margin-right: #{margin_size}%;" unless i == (count - 1)
end
- end
-
- def to_html
- super.to_s + "<div style=\"clear:both;\"></div>".html_safe
end
end
class Column < ActiveAdmin::Component