Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New views should be html.haml or html.erb #314

Closed
vicramon opened this issue Apr 1, 2014 · 3 comments
Closed

New views should be html.haml or html.erb #314

vicramon opened this issue Apr 1, 2014 · 3 comments

Comments

@vicramon
Copy link

vicramon commented Apr 1, 2014

If you type :Rview home/index! then you get app/views/home with no file extension.

The Rails generators will give you a html.erb file, or a html.haml file if you have the haml-rails gem. You can try this with rails g controller home index. Could Rview do the same thing?

@tpope
Copy link
Owner

tpope commented Apr 1, 2014

Yeah maybe if you can find a cheap way to figure out which one we should use. Personally I don't think typing out the extensions is that big of deal.

@vicramon
Copy link
Author

vicramon commented Apr 1, 2014

It's not a big deal, but I dislike having to do it all the time.

Could you do the same thing you did to handle the creation of new javascript files? That just checks to see if the coffee-rails gem is there, right?

@tpope
Copy link
Owner

tpope commented Apr 2, 2014

Difference there is that coffee-rails is the only serious contender in JavaScript generation, and it's official, whereas haml-rails is just the most popular of a long tail of alternative template languages. I used to have a hard coded list of template extensions and it was a constant headache to maintain.

There's also a lot of convolution around the first (format) extension being optional which introduces further complication.

If you want to tackle, start by coming up with an approach just to default it to html.erb, and let me see what that looks like. Other than that I'm leaving this be.

@vicramon vicramon closed this as completed Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants