Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (8 sloc) 0.981 kb

Issues with RewriteRails

Erb and Haml templates

At this time I haven't figured out how to make rewriting work in erb or haml templates. I think the template engine itself has to be hooked rather than working with the files.

file paths

Because rewrite_rails makes copies of your .rr files and puts them in a new place, this will wreak havoc with relative paths in your code. Most specifically, when you manually require another file, you can have unexpected errors, especially if you use relative paths. For example, test_helper.rb might be in the same directory as foobar_test.rb, but if you write widget_test.rr, you will discover that the widget_test.rb file created by rewrite_rails is off in an entirely different directory and a relative link will break.

rake test

Test files are funny. They don't use Rails' automagical loading, so rewrite_rails doesn't intercept them. Therefore... You cannot use rewriters on test cases at this time.

Jump to Line
Something went wrong with that request. Please try again.