Class: ActiveAdmin::Views::GlobalizeAttributesTable
- Inherits:
-
AttributesTable
- Object
- AttributesTable
- ActiveAdmin::Views::GlobalizeAttributesTable
- Defined in:
- lib/active_admin/globalize_attributes_table.rb
Instance Method Summary collapse
Instance Method Details
#row(attr, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/active_admin/globalize_attributes_table.rb', line 7 def row(attr, &block) I18n.available_locales.each_with_index do |locale, index| @table << tr do if index == 0 th :rowspan => I18n.available_locales.length do header_content_for(attr) end end td do I18n.with_locale locale do content_for(block || attr) end end end end end |