Rails Tidy plugin

Plugin details

RailsTidy is a plugin for Ruby On Rails. It allows you to validate your rhtml templates, validate the html output of your functional tests and clean the html generated by rails.

Repositoryhttp://blog.cosinux.org/pages/rails-tidy Author Damien Merenne Tags HTML, tidy LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://blog.cosinux.org/pages/rails-tidy

Simply use

  $ rake test:templates


By default, the plugin will parse all *.rhtml files in your app/views directory. For each files that does not validate, it will create a .errors file which will contain the error messages from tidy for that file.

If you want to validate only one file, use

  $ rake test:templates FILE="path/to/the/file"


If $FILE is a directory, it will search for all *.rhtml file in it and try to validates them. If $FILE is a regular file it will be validated. If $FILE does not exists it will try with:

- ".rhtml" appended to $FILE,
- the app/view directory prepended to $FILE,
- the app/view directory prepended and ".rhtml" appended to $FILE

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 9 months ago