5 ms·
From what I've read, Github uses Mustache also. Logic-less templates are nice. It keeps code out of the views.
by chrisledet 15y ago
From what I've read, Github uses Mustache also. Logic-less templates are nice. It keeps code out of the views.
- wavephorm 15y agoIt keeps code out of the views. ...and put it in controllers, which is terrible for large-scale organization. I would hate to see what their back-end looks like.
- chrisledet 15y agoWith that said, you obviously know little about Mustache and how to use it thus not contributing anything meaningful. I recommend you check out Chris Wanstrath's mustache library for Ruby: https://github.com/defunkt/mustache#readme https://github.com/defunkt/mustache#readme
- wavephorm 15y agoYeah so instead of having a controller and a view, you have a controller and a separate formatter class which looks like this: module ViewHelpers def gravatar gravatar_id = Digest::MD5.hexdigest(self[:email].to_s.strip.downcase) gravatar_for_id(gravatar_id) end def gravatar_for_id(gid, size = 30) "#{gravatar_host}/avatar/#{gid}?s=#{size}" end def gravatar_host @ssl ? 'https://secure.gravatar.com' : 'http://www.gravatar.com' end end I argue this will get extremely tiresome for large websites.
- ryansking 15y agoWorks pretty well for us (twitter.com).