A table named references

John Woods
2009-06-24T18:54:02Z

Hi all,

I accidentally generated a scaffold called reference, not realizing
references was apparently a reserved word in MySQL. I thought I could
get away with it, since the scaffold itself seemed to be working, but
now I''m getting an error that suggests Rails doesn''t like this
scaffold name.

I''d like to rename it to ref. Is it as simple as a search-replace, or
will I encounter other problems? What''s the easiest solution?

Here''s the code, in case anyone''s interested (in a show view)
  <% @genes_phenotypes_references.each do |phenotype_reference| %>

<%= link_to phenotype_reference.phenotype.long_desc,
phenotype_reference.phenotype %>
?
<%= link_to phenotype_reference.reference %>

  <% end %>
genes_phenotypes_references refers to a join table (also a model). The
current view is for gene, so I''m trying to have it print a list of
links to associated phenotypes and the journal article that associates
the gene and the phenotype. Printing the phenotype link works just
fine, but when I try to print the phenotype_reference.reference, it
gives me a link to the current gene show view, (e.g., genes/1),
instead of the reference show view (e.g., references/2).

Many thanks.

Cheers,

John Woods

The University of Texas at Austin
Marcotte Lab | Center for Systems and Synthetic Biology