From 006a89b89fe216c5173fdcd009d889eaf2fc360e Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Thu, 30 Sep 2010 04:51:10 -0400 Subject: [PATCH] make usage with bundler simpler --- README.rdoc | 2 +- init.rb | 2 +- lib/console_update.rb | 4 +++- lib/console_update/activerecord.rb | 2 -- 4 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 lib/console_update/activerecord.rb diff --git a/README.rdoc b/README.rdoc index 8a7d4f7..188946a 100644 --- a/README.rdoc +++ b/README.rdoc @@ -14,7 +14,7 @@ Install as a gem $ gem install console_update # with bundler: add in Gemfile - gem 'console_update', :require=>'console_update/activerecord' + gem 'console_update' # without bundler: add in config/environment.rb config.gem "console_update" diff --git a/init.rb b/init.rb index 72cdf46..28ade3e 100644 --- a/init.rb +++ b/init.rb @@ -1 +1 @@ -require 'console_update/activerecord' +require 'console_update' diff --git a/lib/console_update.rb b/lib/console_update.rb index 495eb01..490132f 100644 --- a/lib/console_update.rb +++ b/lib/console_update.rb @@ -143,4 +143,6 @@ def console_editable_attributes(options) end #:startdoc: end -end \ No newline at end of file +end + +ActiveRecord::Base.send :include, ConsoleUpdate if defined?(ActiveRecord::Base) diff --git a/lib/console_update/activerecord.rb b/lib/console_update/activerecord.rb deleted file mode 100644 index d3d0860..0000000 --- a/lib/console_update/activerecord.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'console_update' -ActiveRecord::Base.send :include, ConsoleUpdate