I've got this model
class Question < ActiveRecord::Base
has_many :votes
def to_s
"hello?"
end
end
and when I attempt to display a Question with <%= @question %>
I get this...
#<ActiveRecord::Relation:0x1042b2960>
obviously I expect to get hello?
Are you sure @question is a Question? The to_s response you are getting makes me think otherwise.
#<ActiveRecord::Relation:0x1042b2960>
It looks like you have a ActiveRecord::Relation, not a Question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With