martes, 29 de abril de 2014

Layouts and Renders in Rails

Layouts and Renders in Rails

To display the contents of a view automatically, this view must have the same controller name that is invoked. The other must be in the correct path, this route must also have the name of the controller, for example controller_name.html.erb.

Should I do this in the following way, if you have a controller with the following name,

app / controllers / examples_controller.rb


app / views / examples / some_view.html.erb






In this way, when the program is executed and invokes the function examples some_view controller, the view is automatically displayed for you on the route the driver name and the name is the function that is invoked.

No hay comentarios:

Publicar un comentario