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
0
59
Rails Plugins in 20 minutes
excid3
August 22, 2024
Tweet
Share
More Decks by excid3
See All by excid3
Crafting Rails Plugins
excid3
1
380
Powerful Rails Features You Might Not Know
excid3
0
3.6k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Statistics for Hackers
jakevdp
796
220k
Unsuck your backbone
ammeep
669
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Optimizing for Happiness
mojombo
376
70k
How to Ace a Technical Interview
jacobian
276
23k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Scaling GitHub
holman
458
140k
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!