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
KagglerがMixSeekを触ってみた
morim
0
320
安いハードウェアでVulkan
fadis
1
810
OTP を自動で入力する裏技
megabitsenmzq
0
130
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
150
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
140
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
290
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
190
Claude Code Skill入門
mayahoney
0
440
Java 21/25 Virtual Threads 소개
debop
0
280
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
100
20260320登壇資料
pharct
0
120
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Abbi's Birthday
coloredviolet
2
5.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Code Reviewing Like a Champion
maltzj
528
40k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
The Cult of Friendly URLs
andyhume
79
6.8k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
420
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
470
Everyday Curiosity
cassininazir
0
180
GraphQLとの向き合い方2022年版
quramy
50
14k
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?