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
View Asset Pipeline Integration
Search
nicolai86
October 30, 2011
Programming
220
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
View Asset Pipeline Integration
A short example on how to move you're views into the asset pipeline using HAML & Handlebars
nicolai86
October 30, 2011
More Decks by nicolai86
See All by nicolai86
Migrating Monolith Rails 2.x Applications using SSO
nicolai86
1
210
Other Decks in Programming
See All in Programming
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
260
信頼性の目標を誰も求めてない
shubox
0
240
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
160
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.3k
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
290
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
Dockerfile CMD for Node.js
grazie1999
0
140
Cloudflare is Agents
chimame
0
180
Featured
See All Featured
Paper Plane
katiecoart
PRO
2
53k
Thoughts on Productivity
jonyablonski
76
5.3k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
670
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
420
The Spectacular Lies of Maps
axbom
PRO
1
950
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Everyday Curiosity
cassininazir
0
300
Joys of Absence: A Defence of Solitary Play
codingconduct
1
450
Discover your Explorer Soul
emna__ayadi
2
1.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Transcript
Asset Pipeline Integration Raphael Randschau w e l u s
e G m b H Sunday, October 30, 11
current state Sunday, October 30, 11
our GOAL first visit Sunday, October 30, 11
our GOAL subsequent visits Sunday, October 30, 11
our GOAL view assembled on the client-side thin controllers fast
page load times! less load! single-page application interesting things can be achieved: - 100% offline apps AppCache - Sunday, October 30, 11
welcome to the asset pipeline not build for view- construction
write HTML yourself no Helper localization won’t do Sunday, October 30, 11
some problems rendering & templating engine ActionView::Helpers attribute binding localization
authorization Sunday, October 30, 11
partial solutions haml_assets haml_handlebars_assets template engine Sunday, October 30, 11
partial solutions haml_assets haml_handlebars_assets = hbs_form_for :user do |f| =
f.text_field :name template engine Sunday, October 30, 11
partial solutions haml_assets haml_handlebars_assets = hbs_form_for :user do |f| =
f.text_field :name template engine Sunday, October 30, 11
partial solutions <form> <input type=”text” value=”{{name}}” /> </form> haml_assets haml_handlebars_assets
= hbs_form_for :user do |f| = f.text_field :name template engine Sunday, October 30, 11
partial solutions Routes handlebars_routes_assets Sunday, October 30, 11
partial solutions r.edit_user_path Routes handlebars_routes_assets Sunday, October 30, 11
partial solutions r.edit_user_path Routes handlebars_routes_assets /users/{{id}}/edit Sunday, October 30, 11
partial solutions = hbs_form_for :user, action: r.edit_user_path, method: :put do
|f| = f.text_field :name <form action=”/users/{{id}}/edit” method=”put”> <input type=”text” value=”{{name}}” /> </form> Sunday, October 30, 11
partial solutions t(:‘hello.world’) Localization jquery-localization-engine Sunday, October 30, 11
partial solutions t(:‘hello.world’) <span rel=”localize[hello.world]”> Hello World! </span> Localization jquery-localization-engine
Sunday, October 30, 11
partial solutions t(:‘hello.world’) <span rel=”localize[hello.world]”> Hello World! </span> $("[rel*=localize]").localize("locales/de") Localization
jquery-localization-engine Sunday, October 30, 11
partial solutions review HAML - rendering ActionView::Helpers handlebars templating dynamic
localization Sunday, October 30, 11
partial solutions questions integrate I18n into FormHelpers ? authorization in
the client? data-filter in the server? restore state when accessing URLs directly? Sunday, October 30, 11
samples https://github.com/leahpar/backbone-asset-pipeline-example http://nicolai86.eu Sunday, October 30, 11
Discussion Sunday, October 30, 11