Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
マスタデータ問題、マイクロサービスでどう解くか
kts
0
100
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
130
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
350
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
TestingOsaka6_Ozono
o3
0
160
認証・認可の基本を学ぼう前編
kouyuume
0
250
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
320
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
開発に寄りそう自動テストの実現
goyoki
2
1k
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
3
810
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.4k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
What's in a price? How to price your products and services
michaelherold
246
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Building an army of robots
kneath
306
46k
Typedesign – Prime Four
hannesfritz
42
2.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
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?