Colin Law wrote in post #1157676:
> On 15 September 2014 21:15, Adrien R. <li...@ruby-forum.com> wrote:
>> Colin Law wrote in post #1157627:
>>> Sorry, I meant Player of course.
>>>
>>
>> Here it is:
>>
>> class Player < ActiveRecord::Base
>>   belongs_to :game
>>   has_many :cards, as: :cardable
>
> What happens if you say
> puts @game.players.inspect
>
> Colin

The same result as previously since the @game.players is nil, it fails 
with "void value expression".

The result for @game.inspect gives me this:
#<Game id: 50, status: nil, created_at: "2014-09-15 21:54:14", 
updated_at: "2014-09-15 21:54:14", big_blind: 2, small_blind: 1, 
player_number: 2, pot: nil, button: nil, to_call: nil, current_player: 
nil>

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/41a4027130c38e69f34fc102ccfd6e3d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to