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
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
CSC307 Lecture 01
javiergs
PRO
0
690
CSC307 Lecture 06
javiergs
PRO
0
680
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
230
AI巻き込み型コードレビューのススメ
nealle
1
210
Package Management Learnings from Homebrew
mikemcquaid
0
220
MUSUBIXとは
nahisaho
0
130
CSC307 Lecture 09
javiergs
PRO
1
830
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
Speed Design
sergeychernyshev
33
1.5k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Everyday Curiosity
cassininazir
0
130
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Accessibility Awareness
sabderemane
0
51
Test your architecture with Archunit
thirion
1
2.2k
Become a Pro
speakerdeck
PRO
31
5.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
Navigating Weather and Climate Data
rabernat
0
100
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
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?