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
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
typoなんかねぇよ
raspython3
0
660
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
370
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
230
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
350
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
140
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
130
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
100
MIZARU@SPAJAM2026 第二回予選
1901drama
0
100
Press start. Python's next generation.
willingc
PRO
3
300
What We Talk About When We Talk About XP
m_seki
2
350
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
550
Product Roadmaps are Hard
iamctodd
55
13k
Google's AI Overviews - The New Search
badams
0
1.6k
From π to Pie charts
rasagy
0
350
Thoughts on Productivity
jonyablonski
76
5.4k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
A better future with KSS
kneath
240
18k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
970
エンジニアに許された特別な時間の終わり
watany
108
250k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
260
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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