I’m wondering if i can generate a scaffold without getting that annyoing s after all scaffolds.
For example, when I run rails generate scaffold product, rails
generates a scaffold called products.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can modify
config/initializers/inflections.rband provide custom Inflections for words that you want to pluralize/singularize differently. Something like:would make it so
rails g scaffold Product ...wouldn’t pluralize the table name and controller name.However, I would advise against doing this en masse, or just because you don’t like pluralization. One of Rails strengths is “Convention over Configuration”, and like in several cases, if you’re not following the convention, it will be more trouble than it’s worth in the long run.