method

singular_class_name

singular_class_name(record_or_class)
public

Returns the singular class name of a record or class. Examples:

  singular_class_name(post)             # => "post"
  singular_class_name(Highrise::Person) # => "highrise_person"

1Note

singular_class_name method missing

morgoth ยท Mar 19, 20101 thank

If this method is undefined in ActionView::Base, add to your ApplicationController: class ApplicationController < ActionController::Base helper_method :singular_class_name end