I'm maintaining an old, undocumented rails application. The app/views/application directory has an index.html.haml file, but the public directory doesn't have an index.html file. Which rails command do I need to run to generate the index file in the public directory? I'm using apache as my web server and passenger as my app server.
Asked
Active
Viewed 131 times
1 Answers
3
rails generate
command generates controllers or scaffolds for you. If you want to create a view, you need to generate a corresponding controller in the controllers folder, plus a route in the route.rb file with the views to show on the web in views folder. I can help you better if I knew the exact problem you are trying to solve. You can use this answer for generating controller and view as a reference.

Community
- 1
- 1

mayorsanmayor
- 2,870
- 4
- 24
- 44