· 1 min read

Screencast: Generatoren in Rails 3

Download:

Download(43.3 MB, 11:24) Alternativer Downloadfür iPod & Apple TV(33.7 MB, 11:24)

Resourcen:

Quellcode:

[bash] rails g rails g scaffold —help rails g scaffold project name:string —no-stylesheets bundle install rails g scaffold task project_id:integer rails g scaffold category name:string [/bash]

[ruby] # Gemfile group :test do gem “shoulda” gem “factory_girl” end

gem “rails3-generators”, :group => :development

# config/application.rb config.generators do |g| g.stylesheets false g.test_framework :shoulda g.fixture_replacement :factory_girl end # … require ‘rails/generators’ Rails::Generators.fallbacks[:shoulda] = :test_unit [/ruby]

Back to Blog