Forum: Ruby on Rails Problematic column on oracle

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
45378b6517bc727d22a778064e3d2f90?d=identicon&s=25 Derrick (Guest)
on 2007-05-31 00:18
(Received via mailing list)
Relatively new to RoR (but not programming) - I've got a basic rails
app against a legacy oracle database.  One of the columns in a table
is called 'suppress'.  Whenever I use the scaffold listing action it
bombs trying to fetch the value in that column.  If I change the name
of the column, all is well.  I can't find anything on suppress being a
reserved column name.  Any ideas?  The specific error is:

Showing c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/templates/scaffolds/list.rhtml where line #13
raised:

no block given

Extracted source (around line #13):

10: <% for entry in instance_variable_get("@#{@scaffold_plural_name}")
%>
11:   <tr>
12:   <% for column in @scaffold_class.content_columns %>
13:     <td><%= entry.send(column.name) %></td>
14:   <% end %>
15:     <td><%= link_to "Show", :action =>
"show#{@scaffold_suffix}", :id => entry %></td>
16:     <td><%= link_to "Edit", :action =>
"edit#{@scaffold_suffix}", :id => entry %></td>
45378b6517bc727d22a778064e3d2f90?d=identicon&s=25 Derrick (Guest)
on 2007-05-31 01:49
(Received via mailing list)
It turns out that this is a column / method naming conflict.  There is
a 'suppress' method in the active support kernel module that is
getting called instead of my accessor method.   But I can't figure out
how to change the column->attribute mapping to use a different name
for the attribute and/or accessor.  Anyone know how to do this?
This topic is locked and can not be replied to.