method

dom_class

Importance_1
v2.1.0 - Show latest stable - 0 notes - Class: ActionController::RecordIdentifier
dom_class(record_or_class, prefix = nil) public

The DOM class convention is to use the singular form of an object or class. Examples:

  dom_class(post)   # => "post"
  dom_class(Person) # => "person"

If you need to address multiple instances of the same class in the same view, you can prefix the dom_class:

  dom_class(post, :edit)   # => "edit_post"
  dom_class(Person, :edit) # => "edit_person"
Show source
Register or log in to add new notes.