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
Rails Plugins in 20 minutes
Search
excid3
August 22, 2024
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails Plugins in 20 minutes
excid3
August 22, 2024
More Decks by excid3
See All by excid3
Crafting Rails Plugins
excid3
1
460
Powerful Rails Features You Might Not Know
excid3
0
4.8k
Featured
See All Featured
Everyday Curiosity
cassininazir
0
240
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
220
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
250
sira's awesome portfolio website redesign presentation
elsirapls
0
290
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Curious Case for Waylosing
cassininazir
1
400
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
440
Transcript
Chris Oliver Rails Plugins in 20 minutes
None
😱
What is a Rails plugin?
None
None
Rails Plugins • Routes • Models • Views • Controllers
• Jobs • Etc
None
Railtie vs Engine
Railtie The core of a Rails plugin • Initializers •
Configuration • Rake tasks
Engine Railtie with more features • Models • Controllers •
Views • Routes • Locales • Tasks
Your Rails app is an Engine.
None
$ rails plugin new
Railtie rails plugin new my_railtie
Engine rails plugin new my_engine —full
Mountable Engines
Mountable Engine rails plugin new my_mountable_engine —full —mountable
\ Mounting Rails Engines in Routes
Engine helper
main_app helper
Dependencies
gemspec
Load Order & Hooks
Rails Plugins Rails Load Order Initializers
None
on_load callbacks
None
None
None
Middleware
– Thoughtful government employees “The website should work only during
business hours. ”
🤔
None
None
None
None
Configuration
Configuration with Accessors
Extending Rails Configuration
Extending Rails Configuration
Generators
None
None
Extending Rails Generators
None
None
Models & Migrations
None
None
None
Rails Console
None
Thanks!