From b4ccbc1866c761565ef0dc812ff48b13e42f010b Mon Sep 17 00:00:00 2001 From: Wu Minzhe Date: Wed, 16 Aug 2017 15:33:03 +0800 Subject: [PATCH 1/2] remove ar include --- lib/acts_as_xlsx/ar.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/acts_as_xlsx/ar.rb b/lib/acts_as_xlsx/ar.rb index 595bd56..a52c164 100644 --- a/lib/acts_as_xlsx/ar.rb +++ b/lib/acts_as_xlsx/ar.rb @@ -92,9 +92,4 @@ def to_xlsx(options = {}) end end end -end - -require 'active_record' -ActiveRecord::Base.send :include, Axlsx::Ar - - +end \ No newline at end of file From cc615e6a911ad6b23d09bb5752e5ccf694d85ca1 Mon Sep 17 00:00:00 2001 From: Wu Minzhe Date: Wed, 16 Aug 2017 15:43:28 +0800 Subject: [PATCH 2/2] readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 37efa47..7b0bb7a 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,11 @@ To install, use the following command: Usage ----- +To include functions to active record, you need a rails initializer: + + require 'active_record' + ActiveRecord::Base.send :include, Axlsx::Ar + ###Examples See the Guides here: