Problematic column on oracle


#1

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:


12: <% for column in @scaffold_class.content_columns %>
13: <%= entry.send(column.name) %>
14: <% end %>
15: <%= link_to “Show”, :action =>
“show#{@scaffold_suffix}”, :id => entry %>
16: <%= link_to “Edit”, :action =>
“edit#{@scaffold_suffix}”, :id => entry %>

#2

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?