Displaying 1 result from an estimated 1 matches for "institute_courses".
2011 Aug 19
0
find_by_sql Method
...the institutes that I have. Any help on what to put in
place of 1 or how to restructure my query will be highly appreciated.
Here is my query!
<%= select ("course_code", "course_name",Course.find_by_sql("select
i.name, c.course_name from institutes as i, courses as c ,
institute_courses as ic where i.id = ic.institute_id and c.id =
ic.course_id and i.id = 1;").collect {|c| [ c.course_name, c.id ] })%>
--
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...