diff options
Diffstat (limited to 'lib/arel/engines/sql/relations/table.rb')
-rw-r--r-- | lib/arel/engines/sql/relations/table.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb index 2653744149..e842f85ed1 100644 --- a/lib/arel/engines/sql/relations/table.rb +++ b/lib/arel/engines/sql/relations/table.rb @@ -16,6 +16,10 @@ module Arel end end + def format(attribute, value) + attribute.column.type_cast(value) + end + def column_for(attribute) has_attribute?(attribute) and columns.detect { |c| c.name == attribute.name.to_s } end |