Forum: Ruby on Rails Display only selected columns

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.
Cc24d46043aac77ee0cba0ad2c2d51f1?d=identicon&s=25 Jonas Gauffin (verifier)
on 2007-07-10 11:13
The code below is from my user model which have a FK called
The visible_columns array are used to display all columns (that should
be visible) and their values.

What should I do to get the 'extension.address' column to work?

  @@visible_columns = ['username', 'first_name', 'last_name',
'extension.address', 'department', 'title']

  def self.visible_columns
    visible_columns = self.content_columns
    visible_columns.delete_if {|item|
@@visible_columns.include?( == false}
This topic is locked and can not be replied to.