Ruby on Rails Wednesday, December 9, 2015

Hello everyone, I am new to ruby, i'm facing issues in it.
When i try to print id for object in loop, i get an error

Here is my code

def index
@lists = List.all
@lists.each do |list|
raise list.id
end
exit
end

I'm getting the error
"

exception class/object expected

"

--
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+unsubscribe@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/38bad090-1391-4f3d-b30f-ce5d1718fca9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment