lib/active_admin/axlsx/dsl.rb in activeadmin-axlsx-1.0.0 vs lib/active_admin/axlsx/dsl.rb in activeadmin-axlsx-2.0.0

- old
+ new

@@ -1,24 +1,12 @@ module ActiveAdmin module Axlsx module DSL - # 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 + delegate :ingnore_columns, :column, :after_filer, :i18n_scope, :header_style, to: :xlsx_builder, prefix: :config + # @see ActiveAdmin::Axlsx::Builder def xlsx(options={}, &block) - config.xlsx_builder = XlsxBuilder.new(options, &block) + config.xlsx_builder = ActiveAdmin::Axlsx::Builder.new(config.resource_class, options, &block) end - end end end