Chris Malek
2007-Jan-21 17:09 UTC
Script to put column names as comments in model class files
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. /app/models/client.rb # column names # client_name # description # homepage_url class Project < ActiveRecord::Base belongs_to :Client has_many :project_items end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robby Russell
2007-Jan-21 17:16 UTC
Re: Script to put column names as comments in model class files
Chris Malek wrote:> 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. > > > > /app/models/client.rb > > # column names > # client_name > # description > # homepage_url > > class Project < ActiveRecord::Base > belongs_to :Client > has_many :project_items > end >Try this link: * http://rubyurl.com/ZxK Cheers, Robby -- Robby Russell http://www.robbyonrails.com/ http://www.planetargon.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Chris Malek
2007-Jan-21 17:21 UTC
Re: Script to put column names as comments in model class files
I knew it was from Dave. My google skills must be lacking today. Thank you very much. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---