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
Haron - Rails TagHelper Trial Horse
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
wtnabe
December 01, 2012
Programming
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Haron - Rails TagHelper Trial Horse
Introducing Haron, Rails TagHelper App on Rails
at Kanazawa.rb meetup #4
wtnabe
December 01, 2012
More Decks by wtnabe
See All by wtnabe
新しいフロントプロセスとドキュメントフォーマットを考えてみた
wtnabe
0
51
Rubyでもモノリポしたい - 調査、おさわり編 -
wtnabe
0
80
Ruby de Railway Oriented Programming
wtnabe
0
130
Bindanのススメ
wtnabe
0
76
そのオブジェクト、何を保証してくれますか? - GuideRailのススメ -
wtnabe
0
84
Effective Jekyll
wtnabe
0
110
5 min Jekyll/Liquid Plugin cooking
wtnabe
0
75
Ruby de Wasm
wtnabe
0
110
Cloud Native Buildpacksって結局どうなの?
wtnabe
0
93
Other Decks in Programming
See All in Programming
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
270
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
AmebaブログはKMPから卒業します
kmars0605
0
180
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
290
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Featured
See All Featured
HDC tutorial
michielstock
2
960
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
990
Building Applications with DynamoDB
mza
96
7.2k
How to Talk to Developers About Accessibility
jct
2
580
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Amusing Abliteration
ianozsvald
1
350
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Navigating Weather and Climate Data
rabernat
0
560
Visualization
eitanlees
153
17k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Transcript
Haron - Rails TagHelper Trial Horse - @wtnabe 2012-12-01(Sat) ⾦沢市⽂化ホール
Haronとは
何するものか RailsのTagHelper練習台 ブラウザで書いてブラウザで確認 だいたいrealtimeに変換
なんで作ったか Railsが得意でないデザイナ向け TagHelperをすぐに試せる環境 RailsでTagHelperの完全回避は無理
例えばimage_tag() <img src="">直書きは御法度 image_tag()でないと?serialが付かない <img src="/path/to/file.png?serial"> cache controlできない
Haronの実装技術
Rails 3.2 ActiveRecord ActiveDecorator Cells Ajax ( JSON )
Rails 3.2 機能的にはシンプルでRailsは不要 RailsのHelperを実際に動かすためにRails
ActiveRecord なくても作れそう 今回はscaffoldからスタートしたので
ActiveDecorator ViewコンテキストでだけModelをextend するModule Helperを使って<%= foo_bar_method( model ) %> Just <%=
model.method %>
Cells 独⽴したControllerとViewから成るView Widget partialでは収まりの悪い部品 Modelへのアクセスがあり様々なViewで 共通に使う部品 最近紹介されているが歴史は古いみたい
Ajax ( JSON ) scaffoldしたJSONのresponseに独⾃の情 報を付加 実際にTagとして変換できた場合だ けDOM更新 views/{C}/show.json.erb
keyup/down event handling realtimeっぽい部分 keyup + 500msでAjax -> DOM更新 keydownで上の流れをstop
続けてtypeしている間は黙って待つ
DEMO
ダメなところ evalを使っているのでサービス化不可 command injectionし放題 デザインとか考えてない feedbackもなくいきなりDOM更新
今後できたらいいな もうちょっと使いたくなるデザイン ActiveRecord撤廃 500 防⽌ ?
Enjoy Rails TagHelper :)