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
Slim Ruby on Rails: Controllers & Middlewares
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Krzysztof Wawer
June 21, 2017
Programming
200
1
Share
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
660
GIT - Good Practices
wafcio
0
96
Dry System
wafcio
0
120
dry-validations
wafcio
0
190
Validations in Ruby
wafcio
0
200
Generating a CSV file with ROM
wafcio
0
360
Trailblazer bez trailblazera
wafcio
0
250
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
200
Jak (nie) używać Service Object
wafcio
0
230
Other Decks in Programming
See All in Programming
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
Java 21/25 Virtual Threads 소개
debop
0
330
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
970
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
240
存在論的プログラミング: 時間と存在を記述する
koriym
5
820
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
560
Coding as Prompting Since 2025
ragingwind
0
760
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
530
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
300
実践CRDT
tamadeveloper
0
330
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
「速くなった気がする」をデータで疑う
senleaf24
0
150
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
We Are The Robots
honzajavorek
0
210
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
Everyday Curiosity
cassininazir
0
190
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Discover your Explorer Soul
emna__ayadi
2
1.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
310
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Chasing Engaging Ingredients in Design
codingconduct
0
160
Accessibility Awareness
sabderemane
0
94
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Designing Powerful Visuals for Engaging Learning
tmiket
1
330
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