Permalink
Browse files

adding a comment for myself

  • Loading branch information...
1 parent 5dec3dd commit 3e0ecde2082f3b0ca07e7b28cdd4f9294a223442 @tenderlove tenderlove committed Feb 6, 2012
@@ -194,6 +194,7 @@ def attribute_present?(attribute)
# Returns the column object for the named attribute.
def column_for_attribute(name)
+ # FIXME: should this return a null object for columns that don't exist?
self.class.columns_hash[name.to_s]
end
@@ -37,16 +37,16 @@ def write_attribute(attr_name, value)
alias_method :raw_write_attribute, :write_attribute
private
- # Handle *= for method_missing.
- def attribute=(attribute_name, value)
- write_attribute(attribute_name, value)
- end
+ # Handle *= for method_missing.
+ def attribute=(attribute_name, value)
+ write_attribute(attribute_name, value)
+ end
- def type_cast_attribute_for_write(column, value)
- return value unless column
+ def type_cast_attribute_for_write(column, value)
+ return value unless column
- column.type_cast_for_write value
- end
+ column.type_cast_for_write value
+ end
end
end
end

0 comments on commit 3e0ecde

Please sign in to comment.