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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
wtnabe
December 01, 2012
Programming
82
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
42
Rubyでもモノリポしたい - 調査、おさわり編 -
wtnabe
0
71
Ruby de Railway Oriented Programming
wtnabe
0
120
Bindanのススメ
wtnabe
0
70
そのオブジェクト、何を保証してくれますか? - GuideRailのススメ -
wtnabe
0
80
Effective Jekyll
wtnabe
0
100
5 min Jekyll/Liquid Plugin cooking
wtnabe
0
73
Ruby de Wasm
wtnabe
0
100
Cloud Native Buildpacksって結局どうなの?
wtnabe
0
89
Other Decks in Programming
See All in Programming
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
230
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
330
Webの地図
yosuke_furukawa
PRO
6
4.1k
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
190
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
100
高専キャリア LT 発表内容
crysta1221
6
5.6k
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
56
37k
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
140
Intent as Code
shoppingjaws
6
840
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
280
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Embracing the Ebb and Flow
colly
88
5.2k
A Soul's Torment
seathinner
7
3.6k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
730
KATA
mclloyd
PRO
35
15k
Why Our Code Smells
bkeepers
PRO
340
58k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building the Perfect Custom Keyboard
takai
2
870
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
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 :)