Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rails 3 Generators

Rails 3 Generators

Using generators in Rails 3. Presented at capetown.rb

Avatar for Chris Stefano

Chris Stefano

May 11, 2011
Tweet

More Decks by Chris Stefano

Other Decks in Programming

Transcript

  1. Application Templates automate steps when creating a new rails app

    rails new my_app -m template.rb e.g. install and configure devise
  2. 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
  3. 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?