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
1
170
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.1k
How to Enjoy the Murajun’s Style
murajun1978
0
88
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
130
Efficient development with GraphQL
murajun1978
0
320
Effective Debugging Apps in VS Code
murajun1978
1
960
tebukuro
murajun1978
0
130
Shinosaka.rb #17 Hands on
murajun1978
0
66
New Features in Rails 4.2
murajun1978
0
950
Other Decks in Programming
See All in Programming
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
450
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
300
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
210
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
350
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
710
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
190
atmaCup #23でAIコーディングを活用した話
ml_bear
4
740
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
370
SourceGeneratorのマーカー属性問題について
htkym
0
160
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.6k
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
660
Leo the Paperboy
mayatellez
4
1.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
WENDY [Excerpt]
tessaabrams
9
36k
Building the Perfect Custom Keyboard
takai
2
710
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
How STYLIGHT went responsive
nonsquared
100
6k
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