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: 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