Type:
Class
Constants:
BLANK_RE : /\A[[:space:]]*\z/

String inflections define new methods on the String class to transform names for different purposes. For instance, you can figure out the name of a table from the name of a class.

'ScaleScore'.tableize # => "scale_scores"
tableize
  • References/Ruby on Rails/Rails/Classes/String

tableize() Instance Public methods Creates the name of a table like Rails does

2025-01-10 15:47:30
inquiry
  • References/Ruby on Rails/Rails/Classes/String

inquiry() Instance Public methods Wraps the current string in the Act

2025-01-10 15:47:30
remove!
  • References/Ruby on Rails/Rails/Classes/String

remove!(pattern) Instance Public methods Alters the string by removing all occurrences

2025-01-10 15:47:30
dasherize
  • References/Ruby on Rails/Rails/Classes/String

dasherize() Instance Public methods Replaces underscores with dashes in the

2025-01-10 15:47:30
pluralize
  • References/Ruby on Rails/Rails/Classes/String

pluralize(count = nil, locale = :en) Instance Public methods Returns the plural

2025-01-10 15:47:30
to_datetime
  • References/Ruby on Rails/Rails/Classes/String

to_datetime() Instance Public methods Converts a string to a

2025-01-10 15:47:30
squish
  • References/Ruby on Rails/Rails/Classes/String

squish() Instance Public methods Returns the string, first removing all whitespace

2025-01-10 15:47:30
humanize
  • References/Ruby on Rails/Rails/Classes/String

humanize(options = {}) Instance Public methods Capitalizes the first word, turns

2025-01-10 15:47:30
squish!
  • References/Ruby on Rails/Rails/Classes/String

squish!() Instance Public methods Performs a destructive squish. See

2025-01-10 15:47:30
to
  • References/Ruby on Rails/Rails/Classes/String

to(position) Instance Public methods Returns a substring from the beginning

2025-01-10 15:47:30