I was recently introduced to Ruby on Rails and the slim template. As I create a new app using the rails new appname command, under app/views/layouts, there are the erb files such as:application.html.erb. As expected right? Is there any way for me to create a new rails application where instead of an application.html.erb file, it's application.html.slim from the get go?
rails new appname
application.html.erb
application.html.slim
Just add the slim-rails gem to your Gemfile and then all generated view files will use .slim extension.
slim-rails
.slim
It hasn't been updated in 2 years but it still works fine for me on Rails 6.
1.4m articles
1.4m replys
5 comments
57.0k users