Hello all. I have the following code in a partial. It''s purpose is to
create a dropdown box with a bunch of values in it for display purposes
only.
(@bugsheet is an instance variable being used by the partial)
<%= select("bugclientlink", "bug_id",
Bugclientlink.listclients(@bugsheet.id))
Given the fact that Bugclientlink class contains:
def self.listclients( reference )
result = Bugclientlink.find_by_sql["select client_ref from
bugclientlink where bug_id = ?", reference ]
result.push(Bugclientlink.new(''99999'', ''
''))
end
end
Can anyone tell me why is it giving me the following error?
Many thanks in advance, I am sure it is something simple I am missing
(The joys of being a nub!)
Jeff
---------------------------------------------------------------
Showing app/views/bugsheet/_display.rhtml where line #31 raised:
wrong number of arguments (0 for 1)
Extracted source (around line #31):
28: </div>
29: <div class="row">
30: <span class="label"><label
for="bugsheet_bs_formname">Reported
By</label></span>
31: <span class="first"><%=
select("bugclientlink", "bug_id",
Bugclientlink.listclients(@bugsheet.id)) %></span>
32: </div>
33: <div class="row">
34: <span class="label"><label
for="bugsheet_bs_assign">Team
Leader</label></span>
Trace of template inclusion: /app/views/bugsheet/show.rhtml
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
#{RAILS_ROOT}/app/models/bugclientlink.rb:5:in `find_by_sql''
#{RAILS_ROOT}/app/models/bugclientlink.rb:5:in `listclients''
#{RAILS_ROOT}/app/views/bugsheet/_display.rhtml:31
#{RAILS_ROOT}/app/views/bugsheet/show.rhtml:2
-e:3:in `load''
-e:3
--
Posted via http://www.ruby-forum.com/.