I have a folder named public with an controller. There I but all the code I want the public to see. I am rendering actions. But in the URL it gets /public/ how do I remove it. I have made a pa开发者_如何学Cge for each category that I have.
And is an way to change the url if example the action is named one. Is it so possible to change it to "rails-exammple". or is it better to name the actions after urls.
And what is the most convenient way to structure a simple app?
This can all be done by setting up your routes correctly. Check out http://guides.rubyonrails.org/routing.html
This can help you to make a dry application : inherited_resources
And I recommend to use haml-rails for a beautiful code :)
精彩评论