Ruby on Rails Wednesday, June 27, 2018

Karthikeyan A K

Thanks for answer.

Because :
- I don't want to add another language to the application,
- Code coverage will not work on it,
- Rubocop will not work on it,
- And, possibly, I want to write Ruby :P

Hassan Schroeder

Thanks for your answer too.

I am a full-stack developer, that can explain why I think ERB templates are useless.

If I'm asking myself, "for who do we write ERB templates with HTML? Who will read the code ?"
I can answer "me ... the team ...So it does not matter, we understand Ruby"


Le mardi 26 juin 2018 21:44:09 UTC+2, Hassan Schroeder a écrit :
On Tue, Jun 26, 2018 at 9:03 AM, David Gautier <david....@kriom.net> wrote:

> Why do we (Rails coders) write views as templates using ERB ... ?

If I *have* to do front end work it's a lot easier to eyeball differences
between the ERB sources and `view source` in a browser.

And if views are ERB it's possible to delegate that work to front-end
folks who only do HTML/CSS/JS stuff.

> Is it a go idea to write views using pure ruby ?

It doesn't sound very maintainable to me, but that doesn't mean
there aren't use cases for it. If it works for you...  ¯\_(ツ)_/¯

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0fbe706e-d8c5-474f-958d-dcd3b3938e2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment