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
93
Deploying with Heroku
virtualstaticvoid
1
43
Other Decks in Programming
See All in Programming
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
570
NEWT Backend Evolution
xpromx
1
170
Amazon Q CLI開発で学んだAIコーディングツールの使い方
licux
3
130
Quality Gates in the Age of Agentic Coding
helmedeiros
PRO
1
110
知って得する@cloudflare_vite-pluginのあれこれ
chimame
1
130
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
0
220
Advanced Micro Frontends: Multi Version/ Framework Scenarios
manfredsteyer
PRO
0
120
Claude Code派?Gemini CLI派? みんなで比較LT会!_20250716
junholee
1
760
Understanding Kotlin Multiplatform
l2hyunwoo
0
240
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
35
10k
[Codecon - 2025] Como não odiar seus testes
camilacampos
0
100
TypeScriptでDXを上げろ! Hono編
yusukebe
3
890
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
182
54k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
19k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
Speed Design
sergeychernyshev
32
1k
Why Our Code Smells
bkeepers
PRO
337
57k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Optimizing for Happiness
mojombo
379
70k
Site-Speed That Sticks
csswizardry
10
730
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Designing for humans not robots
tammielis
253
25k
Building an army of robots
kneath
306
45k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
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?