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
Chris Stefano
May 11, 2011
Programming
0
42
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
92
Deploying with Heroku
virtualstaticvoid
1
43
Other Decks in Programming
See All in Programming
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
760
Gleamという選択肢
comamoca
6
760
ReadMoreTextView
fornewid
1
460
VS Code Update for GitHub Copilot
74th
1
280
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
230
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
200
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
190
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
300
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
240
Effect の双対、Coeffect
yukikurage
5
1.4k
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
310
Featured
See All Featured
Building Adaptive Systems
keathley
43
2.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
A better future with KSS
kneath
239
17k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Into the Great Unknown - MozCon
thekraken
39
1.9k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
How GitHub (no longer) Works
holman
314
140k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
4
200
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Music & Morning Musume
bryan
46
6.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
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?