Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Shared Templates for Rails 3
Search
Alexey
October 01, 2012
Programming
1
190
Shared Templates for Rails 3
Shared Templates for Rails 3
Alexey
October 01, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
370
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.9k
SourceGeneratorのマーカー属性問題について
htkym
0
150
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
220
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
410
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
710
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
240
Python’s True Superpower
hynek
0
200
CSC307 Lecture 14
javiergs
PRO
0
450
AI活用のコスパを最大化する方法
ochtum
0
120
AHC061解説
shun_pi
0
320
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
110
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
460
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
240
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
150
Faster Mobile Websites
deanohume
310
31k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
380
Practical Orchestrator
shlominoach
191
11k
Transcript
Shared Templates for Rails 3 EuRuKo 2012 Amsterdam Alexey Vasiliev
Railsware
Hello my name is Alexey Vasiliev (le0pard) @leopard_me https://github.com/le0pard Engineer
at Railsware.com
Ways to render web interface • Rails render content on
backend and send it to browser • Rails backend have only REST API and interface rendered by JavaScript in web application
Hybrid web application • Interface part rendered on backend and
part rendered on frontend • Very often need to use the same templates for backend and frontend • We need DRY!
And we love Mustache!
smt_rails • smt_rails (Shared Mustache Templates for Rails 3) •
gem 'smt_rails' • rails g smt_rails:install • You're done!
Example Template: Hello {{msg}}!!! ActionView: <%= render "tests/test", :mustache =>
{msg: "Test"} %> JavaScript: var content = SMT['tests/test']({msg: "Test"});
sht_rails • sht_rails (Shared Handlebars Templates for Rails 3) •
Build for people who like handlebars.js :)
Example http://smt.rw.rw/
Questions? Ideas? Opinions?