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
組織で育むオブザーバビリティ
ryota_hnk
0
170
Data-Centric Kaggle
isax1015
2
760
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
110
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
240
AI & Enginnering
codelynx
0
110
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
47
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Bash Introduction
62gerente
615
210k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
55
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Rails Girls Zürich Keynote
gr2m
96
14k
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?