RailsApps / rails-composer

Rails Composer. The Rails generator on steroids for starter apps.
http://www.railscomposer.com/
3.38k stars 486 forks source link

Choosing haml as a template engine #233

Open thenickcox opened 9 years ago

thenickcox commented 9 years ago

This is a port from this issue I filed on rails-stripe-membership-saas. The full text follows:

Firstly, thanks a ton for this project!

This is a weird bug, and I'm not totally sure how it happened. Choosing haml as a templating engine works entirely, except that app/views/devise/registrations has the following files in it after app generation:

edit.html.haml
new.html.erb
new.html.haml

So rails renders new.html.erb preferentially. I was suuuper confused, because new.html.erb doesn't contain anything about checkout. So in essence it looks like the app doesn't contain a checkout, which is the point. This works if you just delete new.html.erb. But it took me a good while to figure that out. (Probably too long, admittedly.) I was able to duplicate this with another generation in another directory.

Edit

Happy to submit a patch if you point me to the right place.

thenickcox commented 9 years ago

It looks possible that devise getting copied over happens after the conversion from erb to haml: https://github.com/RailsApps/rails-composer/blob/c82fe1a677796a12c9885099b6e36cb8d4010405/composer.rb#L184