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
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Shared Templates for Rails 3
Shared Templates for Rails 3
Alexey
October 01, 2012
Other Decks in Programming
See All in Programming
プロポーザルを書いてもらう
pvcresin
0
550
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
150
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
130
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
240
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
570
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
200
バグを直したら useEffect が消えた
colorful12
2
590
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
110
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
5
1.9k
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
940
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
650
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
370
Skip the Path - Find Your Career Trail
mkilby
1
190
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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?