Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rails 3 Generators
Search
Chris Stefano
May 11, 2011
Programming
52
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails 3 Generators
Using generators in Rails 3. Presented at capetown.rb
Chris Stefano
May 11, 2011
More Decks by Chris Stefano
See All by Chris Stefano
Multi-tenancy in Rails
virtualstaticvoid
1
120
Deploying with Heroku
virtualstaticvoid
1
50
Other Decks in Programming
See All in Programming
SREの越境 / SRE Collaboration
y0hgi
2
310
Railsバージョンを4倍にした話
optim
0
350
Jetpack Compose Mechanisms
skydoves
3
820
カツオ、ご期待ください
suneo3476
0
190
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
AWSに止められる覚悟してますか?
morizo_1984
2
530
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Next.js: The final boss of Web Performance
guaca
0
250
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
2
720
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Abbi's Birthday
coloredviolet
4
10k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
How STYLIGHT went responsive
nonsquared
100
6.3k
Automating Front-end Workflow
addyosmani
1369
210k
Speed Design
sergeychernyshev
33
2.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
The Pragmatic Product Professional
lauravandoore
37
7.5k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
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?