Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Shared Templates for Rails 3
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
410
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
contenteditable と日本語入力に向き合う
colorful12
0
200
ジョジョの世界をXRで再現する
mofurune
0
160
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Jetpack Compose Mechanisms
skydoves
3
820
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
Railsバージョンを4倍にした話
optim
0
350
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
First, design no harm
axbom
PRO
2
1.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How to Talk to Developers About Accessibility
jct
2
580
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
30 Presentation Tips
portentint
PRO
1
430
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?