Forum: Ruby on Rails newbie CRUD problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Matthew (Guest)
on 2007-01-08 18:46

This is my first effort with RoR using the tutorial
( I want to simply replace the example
using my own table called "public".

My controller looks like:

class GlycanPublicController < ApplicationController
    scaffold :public

    def list
        @data = public.find_all


and the views file list.rhtml:

<title>Listing ofdata</title>


<h1> List </h1>

<table border=1>
         <td><p align="center"><i><b>ID</b></i></td>
    <td><p align="center"><i><b>Name</b></i></td>


<% @data.each do |public| %>
  <td><%= %></td>
  <td><%= %></td>
<% end %>

<p><%= link_to "Create New Entry", :action => "new" %></p>


The error generated is:

undefined local variable or method `public' for
Daniel H. (Guest)
on 2007-01-08 19:20
(Received via mailing list)
Most likely this will be fixed by capitalizing the "p" in
public.find_all . Also, current usage is find(:all) rather than
find_all, so the complete method would look like:


This topic is locked and can not be replied to.