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
340
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
130
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
9
3.7k
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
470
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
23
12k
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.8k
OSS開発者という働き方
andpad
5
1.7k
アセットのコンパイルについて
ojun9
0
120
Design Foundational Data Engineering Observability
sucitw
3
190
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.2k
Deep Dive into Kotlin Flow
jmatsu
1
310
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Raft: Consensus for Rubyists
vanstee
140
7.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
The Art of Programming - Codeland 2020
erikaheidi
56
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
BBQ
matthewcrist
89
9.8k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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?