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
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
Beyond ORM
77web
5
680
testcontainers のススメ
sgash708
1
120
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Go の GC の不得意な部分を克服したい
taiyow
3
780
return文におけるstd::moveについて
onihusube
1
1.1k
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
103 Early Hints
sugi_0000
1
230
42 best practices for Symfony, a decade later
tucksaun
1
180
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Scaling GitHub
holman
458
140k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Mobile First: as difficult as doing things right
swwweet
222
9k
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?