Dashed DOM ID plugin

Plugin details

The naming convention adopted is to split by - (dashes) --

Repositoryhttp://choonkeat.svnrepository.com/svn/rails-plugins/dashed_dom_id/ Author Chew Choon Keat Tags dom, id LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://choonkeat.svnrepository.com/svn/rails-plugins/dashed_dom_id/

i.e.

     person.dom_id                  # gives 'person-3'
     person.dom_id('name')          # gives 'person-3-name'
     person.dom_id('name', 'dummy') # gives 'dummy-3-name'


This allows splitting by - to obtain 3 logical portions:

    person.dom_id('name').split(/-/) # ['person', '3', 'name']

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago