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
180
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.3k
How to Enjoy the Murajun’s Style
murajun1978
0
100
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
140
Efficient development with GraphQL
murajun1978
0
330
Effective Debugging Apps in VS Code
murajun1978
1
1k
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
72
New Features in Rails 4.2
murajun1978
0
960
Other Decks in Programming
See All in Programming
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
New "Type" system on PicoRuby
pocke
1
920
さぁV100、メモリをお食べ・・・
nilpe
0
140
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
230
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
670
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.9k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.9k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
100
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
The NotImplementedError Problem in Ruby
koic
1
780
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Designing Experiences People Love
moore
143
24k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
Raft: Consensus for Rubyists
vanstee
141
7.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The agentic SEO stack - context over prompts
schlessera
0
820
Done Done
chrislema
186
16k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
Making Projects Easy
brettharned
120
6.7k
Code Reviewing Like a Champion
maltzj
528
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
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