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 3 Generators
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Chris Stefano
May 11, 2011
Programming
0
43
Rails 3 Generators
Using generators in Rails 3. Presented at capetown.rb
Chris Stefano
May 11, 2011
Tweet
Share
More Decks by Chris Stefano
See All by Chris Stefano
Multi-tenancy in Rails
virtualstaticvoid
1
100
Deploying with Heroku
virtualstaticvoid
1
46
Other Decks in Programming
See All in Programming
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
170
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
CSC307 Lecture 01
javiergs
PRO
0
690
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
AI巻き込み型コードレビューのススメ
nealle
0
130
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
6k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
650
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Paper Plane (Part 1)
katiecoart
PRO
0
4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
72
Between Models and Reality
mayunak
1
180
Mobile First: as difficult as doing things right
swwweet
225
10k
Six Lessons from altMBA
skipperchong
29
4.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Transcript
Rails 3 Generators capetown.rb Chris Stefano
Generators love them, hate them?
Generators provide a great way to get started automate repetitive
tasks so you keep going
Generators improved in Rails 3 ✔ modular ✔ extensible ✔
custom generators ✔ uses Thor
Rails 3 Generators configurable replace built-in generators hook into built-in
generators create hooks in custom generators
Take Advantage template overrides application templates scaffold defaults custom generators
Template Overrides override templates for built-in generators e.g. views
Application Templates automate steps when creating a new rails app
rails new my_app -m template.rb e.g. install and configure devise
Scaffold Defaults change generator options e.g. test framework
Custom Generators creating custom generators rails generate generator repetitive_task e.g.
automate a repetitive task
Resources Rails Guides: Creating and Customizing Rails Generators &
Templates http://guides.rubyonrails.org/generators.html Thor Actions http://rdoc.info/github/wycats/thor/master/Thor/Actions.html Rails 3 Generators: mongo, mustache, formtastic etc... http://github.com/indirect/rails3-generators Crafting Rails Applications http://pragprog.com/titles/jvrails/crafting-rails-applications
Thanks Rails 3 Generators capetown.rb Chris Stefano http://github.com/virtualstaticvoid
Puzzle In tradition of Aslam Khan's presentation at RubyFuza, I'll
leave you with a puzzle! consider this Sinatra application get '/guess/:who' do pass unless params[:who] == 'Frank' 'You got me!' end get '/guess/*' do 'You missed!' end how does the pass method work it's magic?