aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-03-07 08:35:48 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-03-07 08:35:48 -0800
commite7cdaedb6bc7d452142b9b8c42942d659efcd11a (patch)
tree5829a046469b524c0839eb18ed3329a7edca1e28 /lib/arel
parent8aa5d7a393e0bbef8cd3ae9ecf64c2358b802b5f (diff)
downloadrails-e7cdaedb6bc7d452142b9b8c42942d659efcd11a.tar.gz
rails-e7cdaedb6bc7d452142b9b8c42942d659efcd11a.tar.bz2
rails-e7cdaedb6bc7d452142b9b8c42942d659efcd11a.zip
cleaning up math operations on attributes
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/attributes/attribute.rb9
-rw-r--r--lib/arel/math.rb4
2 files changed, 4 insertions, 9 deletions
diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb
index bd3f4b58f1..5aea87ac43 100644
--- a/lib/arel/attributes/attribute.rb
+++ b/lib/arel/attributes/attribute.rb
@@ -3,18 +3,15 @@ module Arel
class Attribute < Struct.new :relation, :name
include Arel::Expressions
include Arel::Predications
- end
-
- class NumericAttribute < Attribute
include Arel::Math
end
class String < Attribute; end
class Time < Attribute; end
class Boolean < Attribute; end
- class Decimal < NumericAttribute; end
- class Float < NumericAttribute; end
- class Integer < NumericAttribute; end
+ class Decimal < Attribute; end
+ class Float < Attribute; end
+ class Integer < Attribute; end
class Undefined < Attribute; end
end
diff --git a/lib/arel/math.rb b/lib/arel/math.rb
index 551b1f1010..b7c2419233 100644
--- a/lib/arel/math.rb
+++ b/lib/arel/math.rb
@@ -1,6 +1,5 @@
module Arel
module Math
-
def *(other)
Arel::Nodes::Multiplication.new(self, other)
end
@@ -16,6 +15,5 @@ module Arel
def /(other)
Arel::Nodes::Division.new(self, other)
end
-
end
-end \ No newline at end of file
+end