Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Partially fixes dirty attribute issues.

  • Loading branch information...
commit 18006522ab954c59e8d24c5a9cf10c4375faba11 1 parent 39ded70
@jonmagic authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/toy/attributes.rb
View
4 lib/toy/attributes.rb
@@ -18,7 +18,9 @@ def defaulted_attributes
end
def attribute(key, type, options = {})
- Attribute.new(self, key, type, options)
+ attr = Attribute.new(self, key, type, options)
+ define_attribute_methods [key]
+ attr
end
def attribute?(key)
Please sign in to comment.
Something went wrong with that request. Please try again.