And this led to a lot of problems. It was very difficult if you tried to change the model you are often also changing the view code.
Esto ha llevado a una gran cantidad de problemas y confusión, porque era muy difícil cambiar el modelo y a veces también cambiar el código de la vista.
The first thing we'll do is modify the view code that renders the list of messages and add a "Reply" link below each one.
Lo primero es modificar el código de la vista que muestra la lista de mensajes y añadir un enlace "Reply" a cada uno.
We'll add the attributes in to the view code for the ArticleController's show action.
Vamos a añadir los atributos en el código de la vista de la acción show de ArticleController.
The final change we can make to the view code is to remove any calls to the h method.
El último cambio que nos queda por hacer al código de la vista es borrar las llamadas al método h.
For example below is the view code for the sign in page we saw earlier.
A continuación se muestra el código de la vista para la página de registro que vimos anteriormente.
Doing this in the view code would add a lot of logic there and create duplication so we'll create a helper method to generate each link.
Si hiciésemos esto en la vista añadiríamos bastante lógica y duplicación, por lo que vamos a hacer una función helper que genere cada enlace.
Not every block in the view code needs to be changed, however, even though rake rails:upgrade:check tells you to do so.
Sin embargo no hay que cambiar todos los bloques en el código de las vistas aunque rake rails:upgrade:check nos lo diga.
Do note: should you wish to write the code yourself, click on the View code button.
Tenga en cuenta: si desea escribir el código usted mismo, haga clic en el botón Ver código.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.