Hi, I want to display the column 'name' after being found from the table mytest.
In the mytest.rb, I defined "attrib_accessor :name";
In the procedure index under directory /controller/mytest_controller.rb,
def index
###[Ignore some code]
@[email protected]_by_id
### I am able to verify the tuples in @mytesttbl
end
In the /view/mytest/index.rhtml, I have code like
<div id="mytesttable"> <%= render(:partial =>"mytesttbl", :object => @mytesttbl)%> </div>
In the /view/mytest/_mytesttbl.html.erb. I have code like
<tr>
<td><%=mytestbl.name %></td>
<tr>
when I ran the above code, I have error on _mytesttbl.html.erb,
undefined method 'name ' for #<Array:0xb6c971cc>
Please help. Thanks,