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
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
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
9
1.7k
Serena MCPのすすめ
wadakatu
4
1k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
600
いま中途半端なSwift 6対応をするより、Default ActorやApproachable Concurrencyを有効にしてからでいいんじゃない?
yimajo
2
440
CSC305 Lecture 04
javiergs
PRO
0
270
CSC305 Lecture 06
javiergs
PRO
0
240
Introduce Hono CLI
yusukebe
6
2.6k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
200
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
110
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
250
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
190
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Balancing Empowerment & Direction
lara
5
690
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
A designer walks into a library…
pauljervisheath
209
24k
Context Engineering - Making Every Token Count
addyosmani
7
260
Done Done
chrislema
185
16k
Fireside Chat
paigeccino
40
3.7k
Faster Mobile Websites
deanohume
310
31k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
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?