diff --git a/README.md b/README.md index 37efa47..632fba1 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ Synopsis Acts_as_xlsx is an active record plugin for Axlsx. It makes generating excel spreadsheets from any subclass of ActiveRecord::Base as simple as a couple of lines of code. +This fork adds support for mixing acts_as_xlsx into [ActiveAttr](https://github.com/cgriego/active_attr). + Feature List ------------ diff --git a/acts_as_xlsx.gemspec b/acts_as_xlsx.gemspec index c606276..2aa21fe 100644 --- a/acts_as_xlsx.gemspec +++ b/acts_as_xlsx.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.files = Dir.glob("{lib/**/*}") + %w{ LICENSE README.md Rakefile CHANGELOG.md .yardopts } s.test_files = Dir.glob("{test/**/*}") - s.add_runtime_dependency 'axlsx', '>= 1.0.13' + s.add_runtime_dependency 'axlsx', '>= 3.0.0.pre' s.add_runtime_dependency 'activerecord', '>= 2.3.9' s.add_runtime_dependency 'i18n', '>= 0.4.1' diff --git a/lib/acts_as_xlsx/ar.rb b/lib/acts_as_xlsx/ar.rb index 595bd56..6186136 100644 --- a/lib/acts_as_xlsx/ar.rb +++ b/lib/acts_as_xlsx/ar.rb @@ -97,4 +97,5 @@ def to_xlsx(options = {}) require 'active_record' ActiveRecord::Base.send :include, Axlsx::Ar - +require 'active_attr' +ActiveAttr::BasicModel.send :include, Axlsx::Ar