0

I am using Rails 4 with the Slim gem.

I would like change the default views generated with the command:

rails g controller Foo

I have Slim as template engine by default but I want other html in the templates.

Fran b
  • 3,016
  • 6
  • 38
  • 65
  • Use `slim-rails` gem instead, in does what you're after. – Eyeslandic Sep 03 '14 at 15:42
  • Ok, I have installed slim-rails, but where are templates by default? For instance, I want change html for all views type "show.html.slim" generated with this command. I am looking for in 'lib/templates/' but they are not. What is the path for this views? – Fran b Sep 03 '14 at 16:07

1 Answers1

0

Currently slim doesn't generate .slim files for views, it will be Rails default .erb files. You can actually convert your erb files to slim, here are some references:

Surya
  • 15,703
  • 3
  • 51
  • 74
  • I have already files with .slim extension what I need is change the default html generated. – Fran b Sep 03 '14 at 16:00
  • Sorry buddy but there's no other way than doing it manually or use https://github.com/slim-template/slim-rails gem to generate slim files in future generate command. You will have to change those HTML files with the converters I listed. I was also looking for something like that but unfortunately couldn't find. – Surya Sep 03 '14 at 16:05