Re: [Rails] Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-27 Thread Karthikeyan A K
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 This could be off topic, but there was this excellent thing called Ferro https://easydatawarehousing.github.io/ferro/ , now its not maintained I think. Hassan Schroeder wrote: > On Wed, Jun 27, 2018 at 3:10 AM, David Gautier > wrote: > > > I am

Re: [Rails] Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-27 Thread Hassan Schroeder
On Wed, Jun 27, 2018 at 3:10 AM, David Gautier wrote: > I am a full-stack developer, that can explain why I think ERB templates are > useless. So am I, so that doesn't really "explain" it :-) Also, given the ubiquity of templating systems in basically every language used for web dev, it seems

Re: [Rails] Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-27 Thread David Gautier
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

Re: [Rails] Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-26 Thread Hassan Schroeder
On Tue, Jun 26, 2018 at 9:03 AM, David Gautier 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

Re: [Rails] Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-26 Thread Karthikeyan A K
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Why not try http://slim-lang.com/ David Gautier wrote: > > I like ruby and I don't really link ERB templates ... > > *Why ?* > > Because when you write ruby: > > 1 - It's hard to generate malformed HTML (or others output > languages) because

[Rails] Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-26 Thread David Gautier
I like ruby and I don't really link ERB templates ... *Why ?* Because when you write ruby: 1 - It's hard to generate malformed HTML (or others output languages) because you use methods that generate the code for you. With *ERB*: template.html*.erb* <%= key %> <%= value %> Here I can