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
shinosakarb #11 Rails 4 Pattenrs
Search
murajun1978
December 20, 2014
Programming
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.4k
How to Enjoy the Murajun’s Style
murajun1978
0
110
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.6k
Zeitwerk integration in Rails 6.0
murajun1978
0
150
Efficient development with GraphQL
murajun1978
0
340
Effective Debugging Apps in VS Code
murajun1978
1
1k
tebukuro
murajun1978
0
150
Shinosaka.rb #17 Hands on
murajun1978
0
74
New Features in Rails 4.2
murajun1978
0
970
Other Decks in Programming
See All in Programming
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
150
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
110
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
730
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.5k
その節約、円になってますか?
isamumumu
1
640
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
170
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
240
AIが無かった頃の素敵な出会いの話
codmoninc
1
340
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
180
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
200
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
130
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
490
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Discover your Explorer Soul
emna__ayadi
2
1.2k
How GitHub (no longer) Works
holman
316
150k
Writing Fast Ruby
sferik
630
63k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Tell your own story through comics
letsgokoyo
1
1k
The Limits of Empathy - UXLibs8
cassininazir
1
570
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Transcript
Rails 4 Patterns Shinosaka.rb #11
me @murajun1978
Rails 4.2.0 has been released!
new goodies ActionMailer #deliver_later Active Job Web Console Good! Adequate
Record
Agenda • ActiveRecord::Callbacks • Scope • ActiveSupport::Concern • Decorator •
ActiveDecorator vs Draper • Helper
Fat Controller
Fat Controller
ActiveRecord::Callbacks
Scope NoMethodError!!
Scope
Scope
Fat Model
ActiveSupport::Concern app/models/concerns/… Class method duplicate :(
Decorator ActiveDecorator view logic… :( $ rails g decorator Post
app/decorators/…
Decorator Which do you like? ActiveDecorator Draper https://github.com/drapergem/draper https://github.com/amatsuda/active_decorator
Helper content_tag_for <tr id="post_123" class=“post ..”>…</tr> http://localhost/posts#post_123