Skip to content

Commit

Permalink
use activerecord.attributes as default localization namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Randy Morgan committed Dec 8, 2011
1 parent 2b9baa4 commit 08f0089
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/acts_as_xlsx/ar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def to_xlsx(options = {})
p = options.delete(:package) || Package.new
row_style = p.workbook.styles.add_style(row_style) unless row_style.nil?
header_style = p.workbook.styles.add_style(header_style) unless header_style.nil?
i18n = self.xlsx_i18n == true ? 'activerecord.attributes' : i18n
sheet_name = options.delete(:name) || (i18n ? I18n.t("#{i18n}.#{table_name.underscore}") : table_name.humanize)
data = [*find(:all, options)]
data.compact!
Expand Down

0 comments on commit 08f0089

Please sign in to comment.