can't get ID of created object #35

Nowaker opened this Issue Jan 29, 2012 · 2 comments


None yet

2 participants


The code:

lego = Group.seed(:name) do |s| = 1 = 'lego'
    s.max = 2

puts '@' +

The output:

 - Group {:max=>2, :name=>"lego", :id=>1}

It's terribly broken because there is a built-in method id in Object class. How to access the ID field?


Lol, I was able to work-around it with lego[0].id. Please fix it. :)


#seed method returns array, so that is not a bug actually... But it is confusing to get array when using block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment