Add comments to your tables columns - Remi Mercier
29-Jun-2024 504
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 #comments #tables #columns #Mercier https://rubyonrails.ba/link/add-comments-to-your-tables-columns-remi-mercier