Excluding column names from a listing

Usually, it is better to make your own view instead of using the 
scaffold, but sometimes it's easier just to use the scaffolding.

What I did was override the content_columns method. Just take the
source:
ruby 代码
 
  1. def content_columns  
  2.     @content_columns ||= columns.reject { |c| c.primary || c.name =~   
  3. /(_id|_count)$/ || c.name == inheritance_column }  
  4. end  

And add the column names you want to exclude in the regex with _id and
_count.

你可能感兴趣的:(C++,c,C#,Ruby)