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

  • SEARCH
  • Home
  • 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 8395163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:13:51+00:00 2026-06-09T20:13:51+00:00

I have a model named ActiveDns . When I run rails g scaffold_controller ActiveDns

  • 0

I have a model named ActiveDns. When I run

rails g scaffold_controller ActiveDns

I get the message

Plural version of the model detected, using singularized version. Override with –force-plural.

Now, the controller and views are generated pretending that the singular is ActiveDn and the plural is ActiveDns, and I get silly stuff like link_to new_dn_path. The --force-plural argument doesn’t appear to fix this:

rails g scaffold_controller ActiveDns --force-plural

still results in controllers using variables named @active_dn and views using new_dn_path, with rails 3.2.3. I am removing files between tries using rails d scaffold_controller ActiveDns.

What’s the right way to do this?

  • 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-06-09T20:13:52+00:00Added an answer on June 9, 2026 at 8:13 pm

    What’s the right way to do this?

    I use inflections to document uncountable entities.

    config/initializers/inflections.rb

    ActiveSupport::Inflector.inflections do |inflect|
      inflect.uncountable "ActiveDns"
    end
    

    Then you get:

    $ rails g scaffold_controller ActiveDns
          create  app/controllers/active_dns_controller.rb
          invoke  erb
          create    app/views/active_dns
          create    app/views/active_dns/index.html.erb
          create    app/views/active_dns/edit.html.erb
          create    app/views/active_dns/show.html.erb
          create    app/views/active_dns/new.html.erb
          create    app/views/active_dns/_form.html.erb
          invoke  test_unit
          create    test/functional/active_dns_controller_test.rb
          invoke  helper
          create    app/helpers/active_dns_helper.rb
          invoke    test_unit
          create      test/unit/helpers/active_dns_helper_test.rb
    

    Is this what you wanted?

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

Sidebar

Related Questions

The story so far: I have a rails app with a model named Term.
I have a model named Role. And i am using the helper below in
In Rails, I have a model named Director which references a table with a
I have a Rails 3.0.0 application that has a model named 'Encoding' and is
I have a model named Aggelia (it's greek for classified ad) and have set
Just starting with FactoryGirl. I have a Model named Subscription . It has a
I have a Model that named word. this is my word model public class
I have a such model named Foo: class Foo(models.Model): name = models.CharField() entry =
I have one grails application.In that I have one model class named Book. From
I have a controller/model hypothetically named Pets. Pets has the following declarations: belongs_to :owner

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.