im trying to use find_by_sql, i think its a very useful function, but im
having trouble using it.

in my outcomes table i have:
id     status
1      pass
2      fail
3      pass
4      pass

in my controller im trying to set it like this:
@status = Outcome.find_by_sql "select status from outcomes where id = 1"

and in my outcome view

<body>
 <%= @status %>
 <%= "[EMAIL PROTECTED]" %>
</body>

when viewing the outcome.rhtml

it just appears as '#'

ultimately i am not convinced the find_by_sql is working at all...?

do i need to ensure im using a certain gem, or version or rails?

RAILS 2.0.2
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to