Ruby equivalent to PHP Beautify?


#1

Hi all,

I am working on a project in Rails for my senior seminar
class. I am fairly new to Rails but I have done a major
project, so I know a little. The one thing I cannot find
however is a way to make the html code that is output
look any cleaner. So, I was wondering if there was a
function/library/extension that worked like PHP
beautify. Thanks for your input in this matter. I am sure
I will be asking lots of questions as my project gets even
deeper, so I apologize if you get to know me too well :wink:
Thanks again and have a great day!

Oh, and to anyone who cares, happy Valentine’s Day!


Topher Fangio
removed_email_address@domain.invalid
http://www.fangiotophia.com

Website Specialist
Fangiotophia Designs
(325) 660-7141


#2

There is a ruby interface to tidy:

http://rubyforge.org/projects/tidy/

Not sure whay you would need to do to hook it into a rails app.

You could also rewrite your rhtml files as rxml… at least I would
think that building
the page as an xml tree and then writing it out would create a nice neat
source output.

b


#3

There is a ruby interface to tidy:

http://rubyforge.org/projects/tidy/

Not sure why you would need to do to hook it into a rails app.

You could also rewrite your rhtml files as rxml… at least I would
think that building
the page as an xml tree and then writing it out would create a nice neat
source output.

b


#4

If someone is still interested on this topic:

http://www.cosinux.org/blogs/dam/pages/rails-tidy