Fwd: restricting list columns

Andrew Stone
2005-08-06T04:57:14Z

I thought I would send this again...maybe it was just bad timing and
as active as this list is, it might have gotten overlooked.


---------- Forwarded message ----------
From: Andrew Stone <stonelists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Jul 30, 2005 1:20 PM
Subject: restricting list columns
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org


After scaffolding I would like to change the list pages to be more
restrictive.  I have done the following:

replace content_columns with list_columns in the list.rhtml and
defined list_columns as:

 def self.list_columns
   columns.reject {|c| case
                         when c.name == "name" : false
                         when c.name == "created_on" : false
                         else true
                       end
   }
 end

I there a better way to do this, or is this sufficient?

thanks,
andy
--
Andrew Stone


--
Andrew Stone