Skip to content

Commit

Permalink
Merging with chapter06 to upgrade to Rails 3 RC
Browse files Browse the repository at this point in the history
  • Loading branch information
rbarazi committed Jul 31, 2010
2 parents 2217c04 + 08ee0df commit bb8ef80
Show file tree
Hide file tree
Showing 15 changed files with 2,181 additions and 981 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
Gemfile.lock
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,6 +1,6 @@
source 'http://rubygems.org'

gem 'rails', '3.0.0.beta3'
gem 'rails', '3.0.0.rc'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand Down
5 changes: 1 addition & 4 deletions Rakefile
Expand Up @@ -2,9 +2,6 @@
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

Rails::Application.load_tasks
Blog::Application.load_tasks
11 changes: 9 additions & 2 deletions config/boot.rb
@@ -1,6 +1,13 @@
require 'rubygems'

# Set up gems listed in the Gemfile.
if File.exist?(File.expand_path('../../Gemfile', __FILE__))
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
end
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
3 changes: 3 additions & 0 deletions config/environments/development.rb
Expand Up @@ -16,4 +16,7 @@

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
end
7 changes: 7 additions & 0 deletions config/environments/production.rb
Expand Up @@ -39,4 +39,11 @@

# Enable threaded mode
# config.threadsafe!

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true

# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end
3 changes: 3 additions & 0 deletions config/environments/test.rb
Expand Up @@ -29,4 +29,7 @@
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql

# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
2 changes: 1 addition & 1 deletion config/initializers/inflections.rb
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.

# Add new inflection rules using the following format
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/secret_token.rb
Expand Up @@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Rails.application.config.secret_token = 'ba00674fc07e3be6351f63a2e7a49800b233acfbd2706e6d4f7a477868c3874505025ac253c5f3efd4e6c1e506cbf7075d7245a26a7e3e00aa3f1e52230ff253'
Blog::Application.config.secret_token = 'ba00674fc07e3be6351f63a2e7a49800b233acfbd2706e6d4f7a477868c3874505025ac253c5f3efd4e6c1e506cbf7075d7245a26a7e3e00aa3f1e52230ff253'
4 changes: 2 additions & 2 deletions config/initializers/session_store.rb
@@ -1,8 +1,8 @@
# Be sure to restart your server when you modify this file.

#Rails.application.config.session_store :cookie_store, :key => '_blog_session'
Blog::Application.config.session_store :cookie_store, :key => '_config_session'

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
Rails.application.config.session_store :active_record_store
# Blog::Application.config.session_store :active_record_store
2 changes: 1 addition & 1 deletion config/routes.rb
@@ -1,4 +1,4 @@
Blog::Application.routes.draw do |map|
Blog::Application.routes.draw do
root :to => "articles#index"
resources :articles do
resources :comments
Expand Down
15 changes: 8 additions & 7 deletions db/schema.rb
@@ -1,15 +1,16 @@
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20100503182756) do
ActiveRecord::Schema.define(:version => 20100505233300) do

create_table "articles", :force => true do |t|
t.string "title"
Expand Down

0 comments on commit bb8ef80

Please sign in to comment.