Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
moved require of database driver out of railtie so support non-rails …
Browse files Browse the repository at this point in the history
…environments
  • Loading branch information
diogob committed Jan 3, 2013
1 parent 87b7be2 commit 3170c2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions lib/activerecord-postgres-hstore.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
require 'active_support'

if RUBY_PLATFORM == "jruby"
require 'activerecord-jdbcpostgresql-adapter'
else
require 'pg'
end

if defined? Rails
require "activerecord-postgres-hstore/railties"
else
Expand Down
6 changes: 0 additions & 6 deletions lib/activerecord-postgres-hstore/railties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
require 'rails/generators'
require 'rails/generators/migration'

if RUBY_PLATFORM == "jruby"
require 'activerecord-jdbcpostgresql-adapter'
else
require 'pg'
end

# = Hstore Railtie
#
# Creates a new railtie for 2 reasons:
Expand Down

0 comments on commit 3170c2c

Please sign in to comment.