Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6011661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:17:31+00:00 2026-05-23T02:17:31+00:00

I’m having a problem with generating scaffold for a Regatta. When I run rails

  • 0

I’m having a problem with generating scaffold for a Regatta. When I run

rails g scaffold Regatta name:string start_date:datetime

I get a model named regattum and a controller called regatta_controller (instead of regattas_controller)

  invoke  active_record
  create    db/migrate/20110609221608_create_regatta.rb
  create    app/models/regattum.rb
  invoke    test_unit
  create      test/unit/regattum_test.rb
  create      test/fixtures/regatta.yml
   route  resources :regatta
  invoke  scaffold_controller
  create    app/controllers/regatta_controller.rb
  invoke    erb
  create      app/views/regatta
  create      app/views/regatta/index.html.erb
  create      app/views/regatta/edit.html.erb
  create      app/views/regatta/show.html.erb
  create      app/views/regatta/new.html.erb
  create      app/views/regatta/_form.html.erb
  invoke    test_unit
  create      test/functional/regatta_controller_test.rb
  invoke    helper
  create      app/helpers/regatta_helper.rb
  invoke      test_unit
  create        test/unit/helpers/regatta_helper_test.rb
  invoke  stylesheets

identical public/stylesheets/scaffold.css

Obviously this is an inflection problem, but whenever I modify /config/initializers/inflections.rb I get an error saying:

The name 'Regatta' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.

I have tried everything I can think of to make it work, but I keep getting an error. Any advice on a solution or a workaround would be greatly appreciated!


Update

Here are some of the things I have tried:

ActiveSupport::Inflector.inflections do |inflect|
  inflect.irregular 'regatta', 'regattas'
end

That didn’t change anything so I tried a few of the options below, among others,in varying combinations to no avail:

 inflect.plural 'regatta', 'regattas'
  inflect.singular 'regattas', 'regatta'
  inflect.singular 'regatta', 'regatta'

Update 2

Here is the code I used in inflections.rb once I figured out what I was doing wrong:

ActiveSupport::Inflector.inflections do |inflect|
  inflect.plural 'regatta', 'regattas'
  inflect.singular 'regatta', 'regatta'
  inflect.singular 'regattas', 'regatta'
end

Hopefully this will help someone out in the future!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:17:32+00:00Added an answer on May 23, 2026 at 2:17 am

    Given the error message saying that Regatta is already in use in your application (it’s obviously not reserved by Rails), I’m guessing the Regattum model is still in place.

    I’d recommend destroying the scaffold and trying again. It sounds like, once a word is already defined in the application, Rails has a built-in protection against changing the inflection. So, this error being thrown is to protect against unexpected behavior in this very situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.