ActiveRecord :has_many associations and === operator
- by Jakub
Can someone explain me this Ruby on Rails puzzle?
class Post < ActiveRecord::Base
has_many :comments
end
Post.first.comments.class
=> Array
Array === Post.first.comments
=> false
Array === [ 1 ]
=> true