On Sep 23, 2008, at 11:26 AM, Brad Symons wrote: > i am using the following: > > <%= h Outcome.find(:all, :conditions => ['outcomes.outcome_date = > (select max(o2.outcome_date) from outcomes o2 where o2.testrun_id = > outcomes.testrun_id and o2.testcase_id = outcomes.testcase_id) and > outcomes.testrun_id = ? and outcomes.testcase_id = ?', @testrun, > tc.id]) > %> > > which is working fine, but as usual in the browser the value appears > as: > > #<Outcome:0x371ace8> > > or if i remove the h above > > # > > is there just one way to get the value, which should just be a 1?
Ignoring the presence of so much code in a view, you can define Outcome#to_s to get a customized output for an Outcome object. -Rob Rob Biedenharn http://agileconsultingllc.com [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

