Hi Tom, > On 20 Jul 2016, at 12:37, Tom Hale <[email protected]> wrote: > > Q1) How do I get feedback on what is actually wrong with my .erb syntax? > > Q2) How can I validate that the eventual HTML output is also valid, and not > just relying on my browser being tolerant?
I think these could be achieved by having a test suite that covers your views. That could be focussed RSpec style tests, or it could be a higher level test such as you might get from Cucumber. I've done something similar to this before, when ensuring the HTML was valid was important: http://theled.co.uk/blog/archive/2010/07/17/how-we-added-automated-html-validation-to-our-web-development-process/ I'm pretty sure I ran a copy of the W3C validator locally to avoid going to the internet during the tests. > Q3) Do many people use erb in production or should I be using something > "better"? Something with a decent error checker? (bonus points for > integrating with vim/syntastic) I'd guess (totally unsubstantiated) that ERB is the most used in production, since it's the default with Rails and there are a lot of older Rails apps still around. What should you use if you're starting a project now? Talk to your team. Use what they can support and enjoy working in. If you're a team of 1, have a play and see which you prefer. I like ERB because it's the default, it's easy to see the HTML that'll be output, and just about everyone has used it or something similar - even if they're not Rails developers. HAML, Slim, Liquid, these are all good choices depending on your requirements and your team. Hope that helps. Cheers, Craig | http://barkingiguana.com/ -- Barking Iguana Ltd. is a company registered in England and Wales. Registered number: 08915147. Registered address: Jubilee House, East Beach, Lytham, St. Annes, Lancashire, England, FY8 5FT. -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rails-oceania. For more options, visit https://groups.google.com/d/optout.
