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
1
70
Rails Plugins in 20 minutes
excid3
August 22, 2024
Tweet
Share
More Decks by excid3
See All by excid3
Crafting Rails Plugins
excid3
1
420
Powerful Rails Features You Might Not Know
excid3
0
3.8k
Featured
See All Featured
BBQ
matthewcrist
89
9.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Rails Girls Zürich Keynote
gr2m
95
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
How STYLIGHT went responsive
nonsquared
100
5.6k
RailsConf 2023
tenderlove
30
1.1k
Scaling GitHub
holman
460
140k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Visualization
eitanlees
146
16k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
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!