Documenting views, particular css ids

Has anyone created a facility for automatically documenting Views,
presumably with rdoc?

What I would like to be able to do is to annotate css ids and classes
as I go. For example, say I’m working on app/views/account/
login.rhtml, I want to be able to do something like:

<% ##css login_box container for login %>

<%= form_tag %>

Login
<%= text_field_tag 'login' %>

	<p><label for="password">Password</label><br/>
	<%=  password_field_tag 'password' %></p>
	<p><%= submit_tag 'Log in' %></p>
</form>

…and later run a rake task on my app to produce for html designers
a list of all css ids, organized by controller/view where they occur,
with any ##css comments included.

I find it really flow-killing to switch to the css file to add &
document new css ids as I create them.

If nobody has created such a thing, I probably will, so chime in with
any comments on how you think it ought to work.

An advanced version of it would generate an html styleguide document
that visually documents the css by drawing all the elements in all
the different nestings that occur in the app, with labels.

(I’m aware that in my example my doc comment doesn’t say anything the
id name doesn’t. It’s just an example)

Cheers,
Michael J.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs