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
Hack Claude Code with Claude Code
choplin
4
2.2k
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
150
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
450
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
810
効率的な開発手段として VRTを活用する
ishkawa
0
140
PicoRuby on Rails
makicamel
2
130
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
400
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
110
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
2
18k
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
21
4k
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
130
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
290
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Thoughts on Productivity
jonyablonski
69
4.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Fireside Chat
paigeccino
37
3.5k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Docker and Python
trallard
44
3.5k
The World Runs on Bad Software
bkeepers
PRO
69
11k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Raft: Consensus for Rubyists
vanstee
140
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?