Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Use object equality rather == to check for singleton DB_DEFAULT.
Browse files Browse the repository at this point in the history
Might address #198
  • Loading branch information
ronen committed Jan 23, 2015
1 parent 015e419 commit 86cc087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/schema_plus/active_record/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def original_value_with_schema_plus
# prevent attempts to cast DB_DEFAULT to the attributes type.
# We want to keep it as DB_DEFAULT so that we can handle it when
# generating the sql.
return DB_DEFAULT if value_before_type_cast == DB_DEFAULT
return DB_DEFAULT if value_before_type_cast.equal? DB_DEFAULT
original_value_without_schema_plus
end

Expand Down

0 comments on commit 86cc087

Please sign in to comment.