Topic: Undefined method?
I have a table called surveys. I made a scaffold for that. Now I want to find a specific row that has a certain value before a new can be made. In the new action I have:
@asurvey = Survey.find(:all, :conditions => "status='Active'")
@survey = Survey.new
But in the page new.rhtml when I try @asurvey.id I get a big number instead of what I expect. And if I try to get another field like @asurvey.status I get an error "undefined method `status'". Why is that?
[OT] - I'm not sure RoR was such a smart move after all. I find myself struggling to find answers so much that I almost think I might go back to PHP. Is there a better manual for RoR in the works? Now it is far from the simplicity and elegance that PHP has.