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
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
320
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2.2k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
310
CSC307 Lecture 04
javiergs
PRO
0
640
gunshi
kazupon
1
140
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
120
ThorVG Viewer In VS Code
nors
0
700
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
680
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1.1k
Grafana:建立系統全知視角的捷徑
blueswen
0
290
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
500
TestingOsaka6_Ozono
o3
0
280
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
The Curious Case for Waylosing
cassininazir
0
220
Raft: Consensus for Rubyists
vanstee
141
7.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
120
Designing for Performance
lara
610
70k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
160
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
1
230
Faster Mobile Websites
deanohume
310
31k
Docker and Python
trallard
47
3.7k
Exploring anti-patterns in Rails
aemeredith
2
230
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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?