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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alexey
October 01, 2012
Programming
1
180
Shared Templates for Rails 3
Shared Templates for Rails 3
Alexey
October 01, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
AI時代の認知負荷との向き合い方
optfit
0
160
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
Fluid Templating in TYPO3 14
s2b
0
130
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
dchart: charts from deck markup
ajstarks
3
990
Featured
See All Featured
We Are The Robots
honzajavorek
0
160
Test your architecture with Archunit
thirion
1
2.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
The Pragmatic Product Professional
lauravandoore
37
7.1k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
エンジニアに許された特別な時間の終わり
watany
106
230k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Paper Plane (Part 1)
katiecoart
PRO
0
4.2k
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?