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
190
Shared Templates for Rails 3
Shared Templates for Rails 3
Alexey
October 01, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
230
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
300
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
460
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
200
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
190
Unity6.3 AudioUpdate
cova8bitdots
0
140
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
460
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
390
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
400
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
250
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Become a Pro
speakerdeck
PRO
31
5.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
RailsConf 2023
tenderlove
30
1.4k
Ethics towards AI in product and experience design
skipperchong
2
220
Why Our Code Smells
bkeepers
PRO
340
58k
A better future with KSS
kneath
240
18k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
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?