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
Cleaning up your views
Search
Rebecca Miller-Webster
April 03, 2013
Technology
2
71
Cleaning up your views
Rebecca Miller-Webster
April 03, 2013
Tweet
Share
More Decks by Rebecca Miller-Webster
See All by Rebecca Miller-Webster
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
180
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1k
Trust and Teams: GORUCO 2017
rmw
0
150
Becoming an Engineer Leader Panel Intro Slide
rmw
0
180
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
620
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
380
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
790
Tech Talk 101: Topic Generation
rmw
0
270
Other Decks in Technology
See All in Technology
M5と自作基板をくっつけてみた〜M5 Japan Tour 2024 Spring 福冈 (Fukuoka|福岡)〜
keropiyo
1
240
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
家族アルバム みてねにおけるGrafana活用術 / Grafana Meetup Japan Vol.1 LT
isaoshimizu
1
1.1k
Gradle Build Scanを使ってビルドのことを知ろう potatotips #87
tomorrowkey
2
170
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
370
「知的単純作業」を自動化する、地に足の着いた大規模言語モデル (LLM) の活用
nrryuya
8
5.7k
今さら聞けないDocker入門 〜 Dockerfileのベストプラクティス編
devops_vtj
21
6.2k
パスワードを保存しますか?
hanacchi
0
160
IaCジェネレーターとBedrockで詳細設計書を生成してみた
tsukasa_ishimaru
4
940
Max out Local LLM in Challenging Environments
sashimimochi
2
200
Grafana x PagerDuty Better Together
jacopen
1
330
[2024/04/23]tbls活用事例 〜 ビューポイントから データベースを整理してみた話 〜
tosite
0
120
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
28
4k
GraphQLとの向き合い方2022年版
quramy
33
12k
A better future with KSS
kneath
231
16k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
44k
Designing for Performance
lara
601
67k
Design by the Numbers
sachag
274
18k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Building Applications with DynamoDB
mza
88
5.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
47k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
Into the Great Unknown - MozCon
thekraken
15
1k
Transcript
Cleaning up views with Decorators & Helpers Rebecca Miller-Webster
None
None
• logic in views is harder to test • views
are difficult to reason about Problem: Our Views are messy WTF is happening here??
Decorators & Helpers WHEN SHIT GETS COMPLICATED
Decorators Logic moves with the OBJECT Helpers Logic moves with
the VIEW
This
TO
How?
Generate classes
None
Generate Copy
Encapsulate repetition in partials Sometimes zero Sometimes one Sometimes two
None
Generate html attributes From TO WITH
Thank you!