method
singular_class_name
v2.0.3 -
Show latest stable
- Class:
ActionController::RecordIdentifier
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
If this method is undefined in ActionView::Base, add to your ApplicationController: class ApplicationController < ActionController::Base helper_method :singular_class_name end