On 22 Sep 2008, at 15:31, Brad Symons wrote:
> > Hi Fred > > OK, I have managed to get the result_id to display, but how can i > cross > this over to giving me the resulttype from the results table? > > controller.rb > @test1 = Outcome.find_by_testcase_id(@testcase, :order => > 'outcome_date > desc') > > view.rhtml > <%= h @test1.result_id %> > You could do @test1.result.resulttype If you want AR to fetch that up front you can do > @test1 = Outcome.find_by_testcase_id(@testcase, :order => > 'outcome_date > desc', :include => :result) Fred > i gather the above is ok, but how can i do a join, so i can gather the > string(resulttype) > > if i can crack this, i will be able to pretty much do everything on > tables and joins from here on... > > thanks for your kind help... > > -- > 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

