Skip to content

Commit

Permalink
Remove unnecessary requires and cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
cgriego committed Mar 16, 2012
1 parent ecd0e04 commit 11a6c94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions lib/active_attr/attribute_definition.rb
@@ -1,6 +1,3 @@
require 'active_support/core_ext/hash/reverse_merge'
require 'active_support/core_ext/string/inflections'

module ActiveAttr
# Represents an attribute for reflection
#
Expand Down
2 changes: 1 addition & 1 deletion lib/active_attr/typecasting/big_decimal_typecaster.rb
Expand Up @@ -25,7 +25,7 @@ class BigDecimalTypecaster
#
# @since 0.5.0
def call(value)
if value.is_a?(BigDecimal)
if value.is_a? BigDecimal
value
elsif value.respond_to? :to_d
value.to_d
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/active_attr/attribute_defaults_spec.rb
Expand Up @@ -26,11 +26,11 @@ module ActiveAttr

it "includes declared nil attribute defaults" do
subject.should include "age"
subject['age'].should be_nil
subject["age"].should be_nil
end

it "includes declared dynamic attribute defaults" do
subject['created_at'].should be_a_kind_of Time
subject["created_at"].should be_a_kind_of Time
end
end

Expand Down

0 comments on commit 11a6c94

Please sign in to comment.