Add comments to your tables columns - Remi Mercier

I’ve been looking for a way to add default comments on models attributes for ages!By default, Rails adds comments to some attributes like id (not null, primary key for instance.)But now, I can add my own. For example, I can specify the unit for a duration column. It’s like Yard documentation for methods, but for attributes.These default comments are defined in your schema.rb, so gems like annotate will pick them up. No need to worry about overwrite anymore.
Add comments to your tables columns - Remi Mercier #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/add-comments-to-your-tables-columns-remi-mercier

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles