You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #348, I started to think that maybe the text helpers should return strings rather than append to the view directly.
In the context of #348, I'm imagining the following scenario:
I have:
classTestPageincludeLucky::HTMLPage
needs list : Arraydefrender
to_string(list)
endend
which renders when given a list %(a b c):
a, b, and c
Now, I would like to render I have the following items: a, b, and c
To me, I think it feels a bit more natural to write:
text "I have the following items: #{to_sentence(list)}"
over:
text "I have the following items: "
to_sentence(list)
I also wonder if appending to the view is maybe a bit too much for a text helper to do? To me, it feels like that maybe falls outside of the helpers responsibility? How do you all feel about this?
Thank you so much for your time! Like I said in one of my other issues, I'm really enjoying Lucky and have a tremendous appreciation for all of the work that has been put in to it! 😄
The text was updated successfully, but these errors were encountered:
…yframework#349)
* Rename Form -> SaveOperation
Part of luckyframework/avram#104
* Update the app skeleton to use 'permit_columns' instead of 'fillable'
* Update the app skeleton to use 'Avram::PermittedAttribute'
instead of 'Avram::FillableField'
Hi there!
While working on #348, I started to think that maybe the text helpers should return strings rather than append to the view directly.
In the context of #348, I'm imagining the following scenario:
I have:
which renders when given a list
%(a b c)
:Now, I would like to render
I have the following items: a, b, and c
To me, I think it feels a bit more natural to write:
text "I have the following items: #{to_sentence(list)}"
over:
text "I have the following items: " to_sentence(list)
I also wonder if appending to the view is maybe a bit too much for a text helper to do? To me, it feels like that maybe falls outside of the helpers responsibility? How do you all feel about this?
Thank you so much for your time! Like I said in one of my other issues, I'm really enjoying Lucky and have a tremendous appreciation for all of the work that has been put in to it! 😄
The text was updated successfully, but these errors were encountered: