Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create book #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

create book #5

wants to merge 1 commit into from

Conversation

Vollcode
Copy link
Contributor

@Vollcode Vollcode commented Apr 6, 2016

Created book according to the Recipe model

@@ -0,0 +1,4 @@
<% flash.each do |message_type, message| %>
<%= content_tag(:div, message, class: "alert alert-#{message_type}") %>
<% end %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parece que las lineas 1 a 3 son las mismas que en app/views/recipes/show.html.erb
¿Se te ocurre como podríamos mejorarlo @Vollcode ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podríamos hacer un extract method de ello, que te parece @Pardiez ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me parece que para extraer un "método" habría que tener uno 😉
pero la idea es la misma: evitar esa repetición
De hecho me sé de un tutorial de Rails que te enseña a hacer una aplicación tipo twitter que tiene un ejemplo idéntico, con esas mismas lineas de código 😉 😉

@esebastian
Copy link
Member

Tened en cuenta que el objetivo de las PR no es corregir o aleccionar ad hominem, sino identificar los puntos a resolver en equipo, proponiendo soluciones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants