Forum: Ruby on Rails Script to put column names as comments in model class files

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.
Chris Malek (Guest)
on 2007-01-21 19:10
(Received via mailing list)
I am looking for a script that will put the database column names as
comments above the model files.

I read about this somewhere but I can't seem to find it again.

It was a script that ran through the column names of the database
tables and modified the model class files with comments that showed the
table names.

For instance the script put the "column names" comments that I mocked
up below.


# column names
#    client_name
#    description
#    homepage_url

class Project < ActiveRecord::Base
  belongs_to :Client
  has_many :project_items
Robby R. (Guest)
on 2007-01-21 19:18
(Received via mailing list)
Chris Malek wrote:
> up below.
> class Project < ActiveRecord::Base
>   belongs_to :Client
>   has_many :project_items
> end

Try this link:




Robby R.
Chris Malek (Guest)
on 2007-01-21 19:21
(Received via mailing list)
I knew it was from Dave. My google skills must be lacking today.

Thank you very much.
This topic is locked and can not be replied to.