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
Slim Ruby on Rails: Controllers & Middlewares
Search
Krzysztof Wawer
June 21, 2017
Programming
230
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Slim Ruby on Rails: Controllers & Middlewares
Krzysztof Wawer
June 21, 2017
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
680
GIT - Good Practices
wafcio
0
110
Dry System
wafcio
0
130
dry-validations
wafcio
0
200
Validations in Ruby
wafcio
0
210
Generating a CSV file with ROM
wafcio
0
380
Trailblazer bez trailblazera
wafcio
0
270
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
230
Jak (nie) używać Service Object
wafcio
0
250
Other Decks in Programming
See All in Programming
FreeBSDでZabbixを動かす
kenkino
0
310
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
140
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
250
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
150
PL/pgSQLはなぜ「ふつうのSQL」より遅いのか
tameguro
0
110
Heart of Swift Concurrency
koher
0
900
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
320
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
260
wkhtmltopdfの次どうするか問題2026
willnet
2
1.4k
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
290
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Building an army of robots
kneath
307
46k
Designing for Timeless Needs
cassininazir
1
480
From π to Pie charts
rasagy
1
370
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
The SEO identity crisis: Don't let AI make you average
varn
0
560
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
Transcript
Slim Ruby on Rails: Controllers & Middlewares Krzysztof Wawer
Request https://medium.com/@christemple/what-is-rack-in-ruby-7e0615f1d9b6
Request Rack App Middlewares log auth cache HTTP Request HTTP
Response
Middleware
Rack Middleware http://railscasts.com/episodes/151-rack-middleware
Ruby on Rails Middleware stack $ rails new app $
rails new app --api $ rake middleware http://guides.rubyonrails.org/rails_on_rack.html#configuring-middleware-stack
Ruby on Rails Middleware stack use Rack::MethodOverride use Sprockets::Rails::QuietAssets use
WebConsole::Middleware use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash http://guides.rubyonrails.org/rails_on_rack.html#configuring-middleware-stack
RoR Middlewares problem https://github.com/rails/rails/blob/master/railties/lib/rails/application/default_middleware_stack.rb
http://paulserraino.com/rails/2016/02/29/rails-mountable-engines.html Rails Engines
Ruby on Rails Engine http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/
Controller
None
None
ActionController::Base http://api.rubyonrails.org/classes/ActionController/Base.html
ActionController::API http://api.rubyonrails.org/classes/ActionController/API.html
ActionController::Metal http://api.rubyonrails.org/classes/ActionController/Metal.html
ActionController::API http://api.rubyonrails.org/classes/ActionController/API.html
Why ?
• Strong Parameters • Params Wrapper
• Strong Parameters • Params Wrapper Mapping
Mapping - missing part Nested Attributes - revealing structure