Saturday, September 17, 2011

[Rails] Re: error with select helper

@sub_seasons = [
[1, 2],
[10, 20],
[100, 200]
]

@sub_seasons.collect do |element|
element.id
end

--output:--

undefined method `id' for [1, 2]:Array (NoMethodError)

--
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 post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate