· 1 min read

Screencast: Upgrade auf Rails 3 Teil 2

Download:

Download(40.2 MB, 12:23) Alternativer Download für iPod & Apple TV(28.6 MB, 12:23)

Resourcen:

Quellcode:

[bash] bundle install rails g rspec:install rake rails:upgrade:check rake spec rails plugin remove rails_upgrade_check [/bash]

[ruby] # Gemfile gem “will_paginate”, ”>= 3.0.pre2” group :development, :test do gem “mocha” gem “rspec-rails”, ”>= 2.0.0.beta.19” gem “factory_girl_rails” end

# config/application.rb require ‘yaml’ APP_CONFIG = YAML.load(File.read(File.expand_path(‘../app_config.yml’, __FILE__))) # … config.autoload_paths += %W(#{Rails.root}/lib)

# models/comment.rb scope :recent, order(“created_at DESC”)

# spec_helper.rb config.include ControllerMacros

# specs render_view response.should have_selector(‘title’, :content => ‘Railscasts Comments’)

# config/routes.rb Railscasts::Application.routes.draw do root :to => “episodes#index” match “about” => “info#about”, :as => “about” match “contest” => “info#contest”, :as => “contest” match “feeds” => “info#feeds”, :as => “feeds” match “give_back” => “info#give_back”, :as => “give_back” match “login” => “sessions#new”, :as => “login” match “logout” => “sessions#destroy”, :as => “logout” resources :sponsors resources :comments resources :tags resources :episodes do collection do get :archive end end resources :sessions resources :spam_questions resources :spam_checks resources :spam_reports do member do post :confirm end collection do post :confirm end end end [/ruby]

Back to Blog