email_preview icon indicating copy to clipboard operation
email_preview copied to clipboard

created Railtie to fix routing problem, fixes #15

Open ronin opened this issue 11 years ago • 1 comments

Here is comment to my previous commit.

So I've found out that Rails.application.routes.prepend doesn't actually do anything besides adding associated block to @prepend variable. Blocks in @prepend run when routes.draw is called and this happens before loading gem routes, so gem routes are not prepended at this time. They are also called after changing application routes.rb, which I did when testing this solution.

Now I've created a Railtie which creates initializer prepending application routes. I've tested in two dummy rails applications (4.0.0 and 3.2.16) and in one real application (3.2.12). It would be great if somebody can test it and confirm that it is working ok now.

ronin avatar Feb 01 '14 22:02 ronin

I'd love to accept this patch, but I want to try and prevent any future regression as well via a unit test. would you mind taking a stab at a test for this usecase?

wireframe avatar Feb 25 '14 16:02 wireframe