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 4028198
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:11:27+00:00 2026-05-20T11:11:27+00:00

irb(main):001:0> require ‘active_support’ => true irb(main):002:0> require ‘active_support/inflector/inflections’ => true irb(main):003:0> ActiveSupport::Inflector.pluralize(‘test’) => test

  • 0
irb(main):001:0> require 'active_support'
=> true
irb(main):002:0> require 'active_support/inflector/inflections'
=> true
irb(main):003:0> ActiveSupport::Inflector.pluralize('test')
=> "test"
irb(main):004:0> ActiveSupport::Inflector.singularize('tests')
=> "tests"
irb(main):005:0> ActiveSupport::Inflector.titleize('hat simulator')
=> "Hat Simulator"
<ort::Inflector.tableize("america's number one hat simulator")
=> "america's number one hat simulator"

Well, basically, that’s the question. It’s confusing me that methods such as titleize seem to work fine, but tableize, pluralize and singularize don’t.

Have I forgotten to require something?

(On a separate note, I notice this page provides examples like "post".pluralize, which when I tried, resulted in NoMethodError: undefined method 'pluralize' for "post":String. But maybe that’s something to save for another question.)

  • 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-20T11:11:28+00:00Added an answer on May 20, 2026 at 11:11 am

    Access to #pluralize without adding new methods to the String class:

    require 'active_support/inflector'
    ActiveSupport::Inflector.pluralize('test')
    #=> "tests"
    

    For String class:

    require 'active_support/core_ext/string'
    "test".pluralize
    #=> "tests"
    

    which actually calls ActiveSupport::Inflector.pluralize underneath:

    def pluralize
      ActiveSupport::Inflector.pluralize(self)
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following: irb(main):001:0> class A irb(main):002:1> def initialize irb(main):003:2> @string = my string
I'm trying compass in irb, this is my code: C:\Documents and Settings\test>irb irb(main):001:0> require
Here's my irb session: irb(main):001:0> class User irb(main):002:1> include MongoMapper::Document irb(main):003:1> key :name, String
irb(main):001:0> test = (0/1).rationalize => (0/1) irb(main):002:0> test.to_i NoMethodError: undefined method `to_i' for (0/1):Rational
C:\>irb irb(main):001:0> s = Proc.new { puts Hello } => #<Proc:0x04051780@(irb):1> irb(main):002:0> s.call Hello
In Ruby, I can define a method foo=(bar) : irb(main):001:0> def foo=(bar) irb(main):002:1> p
What is happening here?? irb(main):001:0> a= nil => nil irb(main):002:0> b = nil =>
Can anyone shed some insight onto why the following happens? irb(main):001:0> r = '1'..'30'
I'm simply trying to get a percentage. irb(main):001:0> (25 / 50) * 100 =>
Ruby 1.9 irb(main):001:0> ?c => c Ruby 1.8.6 irb(main):001:0> ?c => 99 what does

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.