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

Commit

Permalink
merged conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
diogob committed Jan 3, 2013
2 parents 82f22b9 + 7bc55ae commit df0cd0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lib/activerecord-postgres-hstore.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
require "activerecord-postgres-hstore/railties"
require 'active_support'
if defined? Rails
require "activerecord-postgres-hstore/railties"
else
ActiveSupport.on_load :active_record do
require "activerecord-postgres-hstore/activerecord"
end
end
require "activerecord-postgres-hstore/string"
require "activerecord-postgres-hstore/hash"
require "activerecord-postgres-hstore/coder"
2 changes: 1 addition & 1 deletion lib/activerecord-postgres-hstore/activerecord.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def destroy_keys! attribute, *keys
destroy_keys(attribute, *keys).save
end

if defined?(Rails) && Rails.version < '3.1.0'
if defined? Rails and Rails.version < '3.1.0'
# This method is replaced for Rails 3 compatibility.
# All I do is add the condition when the field is a hash that converts the value
# to hstore format.
Expand Down

0 comments on commit df0cd0d

Please sign in to comment.