Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Force id to be an Integer

  • Loading branch information...
commit 338f10478d8a1aa5b67cd9aecb2c7770b3954945 1 parent b5cec8a
@tpope tpope authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/pickler/tracker.rb
View
5 lib/pickler/tracker.rb
@@ -97,7 +97,10 @@ def self.accessor(*methods)
define_method("#{method}=") { |v| @attributes[method.to_s] = v }
end
end
- reader :id
+
+ def id
+ id = @attributes['id'] and Integer(id)
+ end
def to_xml(options = nil)
@attributes.to_xml({:dasherize => false, :root => self.class.name.split('::').last.downcase}.merge(options||{}))
Please sign in to comment.
Something went wrong with that request. Please try again.