Skip to content

Commit 1f90877

Browse files
committed
add headerstyle alias for header_format
add delegates to dsl
1 parent 0ed8735 commit 1f90877

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/active_admin/xls/builder.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def header_format
4040
@header_format ||= {}
4141
end
4242

43+
alias header_style header_format
44+
4345
# This has can be used to override the default header style for your
4446
# sheet. Any values you provide will be merged with the default styles.
4547
# Precidence is given to your hash
@@ -49,6 +51,8 @@ def header_format=(format_hash)
4951
@header_format = header_format.merge(format_hash)
5052
end
5153

54+
alias header_style= header_format=
55+
5256
# Indicates that we do not want to serialize the column headers
5357
def skip_header
5458
@skip_header = true

lib/active_admin/xls/dsl.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ module ActiveAdmin
22
module Xls
33
# extends activeadmin dsl to include xls
44
module DSL
5-
delegate(:ignore_columns,
5+
delegate(:after_filter,
6+
:before_filter,
67
:column,
7-
:after_filter,
8-
:i18n_scope,
8+
:delete_columns,
99
:header_format,
10+
:header_style,
11+
:i18n_scope,
1012
:skip_header,
1113
:whitelist,
1214
to: :xls_builder,

0 commit comments

Comments
 (0)