Module: ActiveAdmin::Axlsx::DSL

Defined in:
lib/active_admin/axlsx/dsl.rb

Instance Method Summary collapse

Instance Method Details

#xlsx(options = {}, &block) ⇒ Object

Configure the xlsx format

For example:

xlsx do
  i18n_scope = [:active_admin, :resources, :post]
  column :name
  column(:author) { |post| post.author.full_name }
end

xlsx :header_style => { :bg_color => "00", :fg_color => "FF" } do
  column :name
end


17
18
19
# File 'lib/active_admin/axlsx/dsl.rb', line 17

def xlsx(options={}, &block)
  config.xlsx_builder = XlsxBuilder.new(options, &block)
end