21.2 Routing Requests 20 ActiveRecord: Object Life Cycle
ruby -rubygems /home/rubys/git/rails/railties/bin/rails restful
create
create README
create .gitignore
create Rakefile
create config.ru
create Gemfile
create app
create app/helpers/application_helper.rb
create app/controllers/application_controller.rb
create app/views/layouts
create app/models
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/test.rb
create config/environments/production.rb
create config/initializers
create config/initializers/mime_types.rb
create config/initializers/inflections.rb
create config/initializers/cookie_verification_secret.rb
create config/initializers/session_store.rb
create config/initializers/backtrace_silencers.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create log
create log/server.log
create log/production.log
create log/development.log
create log/test.log
create public
create public/500.html
create public/robots.txt
create public/favicon.ico
create public/422.html
create public/404.html
create public/index.html
create public/images
create public/images/rails.png
create public/stylesheets
create public/stylesheets/.gitkeep
create public/javascripts
create public/javascripts/prototype.js
create public/javascripts/dragdrop.js
create public/javascripts/rails.js
create public/javascripts/effects.js
create public/javascripts/controls.js
create public/javascripts/application.js
create script
create script/rails
create test
create test/test_helper.rb
create test/performance/browsing_test.rb
create test/fixtures
create test/unit
create test/functional
create test/integration
create tmp
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create vendor/plugins
create vendor/plugins/.gitkeep
bundle install
Resolving dependencies
Installing rake (0.8.7) from system gems
Installing abstract (1.0.0) from system gems
Installing builder (2.1.2) from system gems
Installing i18n (0.3.6.pre) from system gems
Installing memcache-client (1.8.1) from system gems
Installing tzinfo (0.3.17) from system gems
Installing activesupport (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing activemodel (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing erubis (2.6.5) from system gems
Installing rack (1.1.0) from system gems
Installing rack-mount (0.6.1) from system gems
Installing rack-test (0.5.3) from system gems
Installing actionpack (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing mime-types (1.16) from system gems
Installing mail (2.1.3) from system gems
Installing text-hyphen (1.0.0) from system gems
Installing text-format (1.0.0) from system gems
Installing actionmailer (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing arel (0.3.1) from system gems
Installing activerecord (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing activeresource (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing bundler (0.9.12) from system gems
Installing thor (0.13.4) from system gems
Installing railties (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing rails (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing sqlite3-ruby (1.2.5) from system gems
Your bundle is complete!
edit config/routes.rb
Restful::Application.routes.draw do |map|
# ...
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
match ':controller(/:action(/:id(.:format)))'
end
rails generate scaffold article title:string summary:text content:text
invoke active_record
create db/migrate/20100322012232_create_articles.rb
create app/models/article.rb
invoke test_unit
create test/unit/article_test.rb
create test/fixtures/articles.yml
route resources :articles
invoke scaffold_controller
create app/controllers/articles_controller.rb
invoke erb
create app/views/articles
create app/views/articles/index.html.erb
create app/views/articles/edit.html.erb
create app/views/articles/show.html.erb
create app/views/articles/new.html.erb
create app/views/articles/_form.html.erb
create app/views/layouts/articles.html.erb
invoke test_unit
create test/functional/articles_controller_test.rb
invoke helper
create app/helpers/articles_helper.rb
invoke test_unit
create test/unit/helpers/articles_helper_test.rb
invoke stylesheets
create public/stylesheets/scaffold.css
rake db:migrate
mv 20100322012232_create_articles.rb 20100301000001_create_articles.rb
(in /home/rubys/git/awdwr/work/restful)
== CreateArticles: migrating =================================================
-- create_table(:articles)
-> 0.0022s
== CreateArticles: migrated (0.0023s) ========================================
rake routes
(in /home/rubys/git/awdwr/work/restful)
GET /articles(.:format) {:controller=>"articles", :action=>"index"}
articles POST /articles(.:format) {:controller=>"articles", :action=>"create"}
new_article GET /articles/new(.:format) {:controller=>"articles", :action=>"new"}
GET /articles/:id(.:format) {:controller=>"articles", :action=>"show"}
PUT /articles/:id(.:format) {:controller=>"articles", :action=>"update"}
article DELETE /articles/:id(.:format) {:controller=>"articles", :action=>"destroy"}
edit_article GET /articles/:id/edit(.:format) {:controller=>"articles", :action=>"edit"}
/:controller(/:action(/:id(.:format)))
edit config/routes.rb
Restful::Application.routes.draw do |map|
resources :articles
# ...
match ':controller(/:action(/:id(.:format)))'
end
edit app/controllers/articles_controller.rb
class ArticlesController < ApplicationController
# GET /articles
# GET /articles.xml
def index
@articles = Article.all
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @articles }
end
end
# GET /articles/1
# GET /articles/1.xml
def show
@article = Article.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @article }
end
end
# GET /articles/new
# GET /articles/new.xml
def new
@article = Article.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @article }
end
end
# GET /articles/1/edit
def edit
@article = Article.find(params[:id])
end
# POST /articles
# POST /articles.xml
def create
@article = Article.new(params[:article])
respond_to do |format|
if @article.save
format.html { redirect_to(@article, :notice => 'Article was successfully created.') }
format.xml { render :xml => @article, :status => :created,
:location => @article }
else
format.html { render :action => "new" }
format.xml { render :xml => @article.errors,
:status => :unprocessable_entity }
end
end
end
# PUT /articles/1
# PUT /articles/1.xml
def update
@article = Article.find(params[:id])
respond_to do |format|
if @article.update_attributes(params[:article])
format.html { redirect_to(@article, :notice => 'Article was successfully updated.') }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @article.errors,
:status => :unprocessable_entity }
end
end
end
# DELETE /articles/1
# DELETE /articles/1.xml
def destroy
@article = Article.find(params[:id])
@article.destroy
respond_to do |format|
format.html { redirect_to(articles_url) }
format.xml { head :ok }
end
end
end
edit app/views/articles/index.html.erb
<h1>Listing articles</h1>
<table>
<tr>
<th>Title</th>
<th>Summary</th>
<th>Content</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @articles.each do |article| %>
<tr>
<td><%= article.title %></td>
<td><%= article.summary %></td>
<td><%= article.content %></td>
<td><%= link_to 'Show', article %></td>
<td><%= link_to 'Edit', edit_article_path(article) %></td>
<td><%= link_to 'Destroy', article, :confirm => 'Are you sure?',
:method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Article', new_article_path %>
edit config/routes.rb
Restful::Application.routes.draw do |map|
resources :articles do
collection do
get :recent
end
end
# ...
# ...
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get :short
# post :toggle
# end
#
# collection do
# get :sold
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get :recent, :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => "welcome#index"
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
match ':controller(/:action(/:id(.:format)))'
end
rake routes
(in /home/rubys/git/awdwr/work/restful)
recent_articles GET /articles/recent(.:format) {:controller=>"articles", :action=>"recent"}
GET /articles(.:format) {:controller=>"articles", :action=>"index"}
articles POST /articles(.:format) {:controller=>"articles", :action=>"create"}
new_article GET /articles/new(.:format) {:controller=>"articles", :action=>"new"}
GET /articles/:id(.:format) {:controller=>"articles", :action=>"show"}
PUT /articles/:id(.:format) {:controller=>"articles", :action=>"update"}
article DELETE /articles/:id(.:format) {:controller=>"articles", :action=>"destroy"}
edit_article GET /articles/:id/edit(.:format) {:controller=>"articles", :action=>"edit"}
/:controller(/:action(/:id(.:format)))
edit config/routes.rb
Restful::Application.routes.draw do |map|
resources :articles do
member do
post :embargo, :release
end
end
# ...
# ...
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get :short
# post :toggle
# end
#
# collection do
# get :sold
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get :recent, :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => "welcome#index"
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
match ':controller(/:action(/:id(.:format)))'
end
rake routes
(in /home/rubys/git/awdwr/work/restful)
embargo_article POST /articles/:id/embargo(.:format) {:controller=>"articles", :action=>"embargo"}
release_article POST /articles/:id/release(.:format) {:controller=>"articles", :action=>"release"}
GET /articles(.:format) {:controller=>"articles", :action=>"index"}
articles POST /articles(.:format) {:controller=>"articles", :action=>"create"}
new_article GET /articles/new(.:format) {:controller=>"articles", :action=>"new"}
GET /articles/:id(.:format) {:controller=>"articles", :action=>"show"}
PUT /articles/:id(.:format) {:controller=>"articles", :action=>"update"}
article DELETE /articles/:id(.:format) {:controller=>"articles", :action=>"destroy"}
edit_article GET /articles/:id/edit(.:format) {:controller=>"articles", :action=>"edit"}
/:controller(/:action(/:id(.:format)))
edit config/routes.rb
Restful::Application.routes.draw do |map|
resources :articles do
collection do
namespace('new') { post :shortform }
end
end
# ...
# ...
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get :short
# post :toggle
# end
#
# collection do
# get :sold
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get :recent, :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => "welcome#index"
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
match ':controller(/:action(/:id(.:format)))'
end
rake routes
(in /home/rubys/git/awdwr/work/restful)
shortform_articles_new POST /articles/new/shortform(.:format) {:controller=>"articles", :action=>"shortform"}
GET /articles(.:format) {:controller=>"articles", :action=>"index"}
articles POST /articles(.:format) {:controller=>"articles", :action=>"create"}
new_article GET /articles/new(.:format) {:controller=>"articles", :action=>"new"}
GET /articles/:id(.:format) {:controller=>"articles", :action=>"show"}
PUT /articles/:id(.:format) {:controller=>"articles", :action=>"update"}
article DELETE /articles/:id(.:format) {:controller=>"articles", :action=>"destroy"}
edit_article GET /articles/:id/edit(.:format) {:controller=>"articles", :action=>"edit"}
/:controller(/:action(/:id(.:format)))
edit config/routes.rb
Restful::Application.routes.draw do |map|
resources :articles do
resources :comments
end
# ...
match ':controller(/:action(/:id(.:format)))'
end
rake routes
(in /home/rubys/git/awdwr/work/restful)
GET /articles/:article_id/comments(.:format) {:controller=>"comments", :action=>"index"}
article_comments POST /articles/:article_id/comments(.:format) {:controller=>"comments", :action=>"create"}
new_article_comment GET /articles/:article_id/comments/new(.:format) {:controller=>"comments", :action=>"new"}
GET /articles/:article_id/comments/:id(.:format) {:controller=>"comments", :action=>"show"}
PUT /articles/:article_id/comments/:id(.:format) {:controller=>"comments", :action=>"update"}
article_comment DELETE /articles/:article_id/comments/:id(.:format) {:controller=>"comments", :action=>"destroy"}
edit_article_comment GET /articles/:article_id/comments/:id/edit(.:format) {:controller=>"comments", :action=>"edit"}
GET /articles(.:format) {:controller=>"articles", :action=>"index"}
articles POST /articles(.:format) {:controller=>"articles", :action=>"create"}
new_article GET /articles/new(.:format) {:controller=>"articles", :action=>"new"}
GET /articles/:id(.:format) {:controller=>"articles", :action=>"show"}
PUT /articles/:id(.:format) {:controller=>"articles", :action=>"update"}
article DELETE /articles/:id(.:format) {:controller=>"articles", :action=>"destroy"}
edit_article GET /articles/:id/edit(.:format) {:controller=>"articles", :action=>"edit"}
/:controller(/:action(/:id(.:format)))
rails generate model comment comment:text article_id:integer
invoke active_record
create db/migrate/20100322012303_create_comments.rb
create app/models/comment.rb
invoke test_unit
create test/unit/comment_test.rb
create test/fixtures/comments.yml
rails generate controller comments new edit update destroy
create app/controllers/comments_controller.rb
route get "/comments/destroy" => "comments#destroy"
route get "/comments/update" => "comments#update"
route get "/comments/edit" => "comments#edit"
route get "/comments/new" => "comments#new"
invoke erb
create app/views/comments
create app/views/comments/new.html.erb
create app/views/comments/edit.html.erb
create app/views/comments/update.html.erb
create app/views/comments/destroy.html.erb
invoke test_unit
create test/functional/comments_controller_test.rb
invoke helper
create app/helpers/comments_helper.rb
invoke test_unit
create test/unit/helpers/comments_helper_test.rb
rm app/views/comments/destroy.html.erb
rm app/views/comments/update.html.erb
edit app/models/article.rb
class Article < ActiveRecord::Base
has_many :comments
end
edit app/models/comment.rb
class Comment < ActiveRecord::Base
belongs_to :article
end
rake db:migrate
mv 20100322012303_create_comments.rb 20100301000002_create_comments.rb
(in /home/rubys/git/awdwr/work/restful)
== CreateComments: migrating =================================================
-- create_table(:comments)
-> 0.0021s
== CreateComments: migrated (0.0022s) ========================================
edit app/views/articles/show.html.erb
<p>
<b>Title:</b>
<%= @article.title %>
</p>
<p>
<b>Summary:</b>
<%= @article.summary %>
</p>
<p>
<b>Content:</b>
<%= @article.content %>
</p>
<% unless @article.comments.empty? %>
<%= render :partial => "/comments/comment",
:collection => @article.comments %>
<% end %>
<%= link_to "Add comment", new_article_comment_url(@article) %> |
<%= link_to 'Edit', edit_article_path(@article) %> |
<%= link_to 'Back', articles_path %>
edit app/views/comments/_comment.html.erb
<div class="comment">
<p>
<strong>Comment last updated: <%= comment.updated_at %></strong>
<%= link_to "Edit", edit_article_comment_url(:id => comment,
:article_id => comment.article) %>
<%= link_to "Delete", article_comment_url(:id => comment,
:article_id => comment.article),
:method => :delete %>
</p>
<blockquote>
<%=h comment.comment %>
</blockquote>
</div>
edit app/views/comments/_form.html.erb
<%= form.text_area :comment, :rows => 3 %>
edit app/views/comments/edit.html.erb
<h1>Editing comment</h1>
<%= error_messages_for :comment %>
<% form_for([@article,@comment]) do |f| %>
<p>
<b>Comment</b><br />
<%= f.text_area :comment %>
</p>
<p>
<b>Article</b><br />
<%= f.text_field :article_id %>
</p>
<p>
<%= f.submit "Update" %>
</p>
<% end %>
<%= link_to 'Back', article_path(@article) %>
edit app/views/comments/new.html.erb
<% form_for [@article, @comment] do |form| %>
<fieldset>
<legend>Add a Comment</legend>
<%= render :partial => 'form', :object => form %>
<p>
<%= submit_tag "Create" %>
</p>
</fieldset>
<% end %>
edit app/controllers/comments_controller.rb
class CommentsController < ApplicationController
before_filter :find_article
def new
@comment = Comment.new
end
def edit
@comment = @article.comments.find(params[:id])
end
def create
@comment = Comment.new(params[:comment])
if (@article.comments << @comment)
redirect_to article_url(@article)
else
render :action => :new
end
end
def update
@comment = @article.comments.find(params[:id])
if @comment.update_attributes(params[:comment])
redirect_to article_url(@article)
else
render :action => :edit
end
end
def destroy
comment = @article.comments.find(params[:id])
@article.comments.delete(comment)
redirect_to article_url(@article)
end
private
def find_article
@article_id = params[:article_id]
return(redirect_to(articles_url)) unless @article_id
@article = Article.find(@article_id)
end
end
ruby -rubygems /home/rubys/git/rails/railties/bin/rails routing
create
create README
create .gitignore
create Rakefile
create config.ru
create Gemfile
create app
create app/helpers/application_helper.rb
create app/controllers/application_controller.rb
create app/views/layouts
create app/models
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/test.rb
create config/environments/production.rb
create config/initializers
create config/initializers/mime_types.rb
create config/initializers/inflections.rb
create config/initializers/cookie_verification_secret.rb
create config/initializers/session_store.rb
create config/initializers/backtrace_silencers.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create log
create log/server.log
create log/production.log
create log/development.log
create log/test.log
create public
create public/500.html
create public/robots.txt
create public/favicon.ico
create public/422.html
create public/404.html
create public/index.html
create public/images
create public/images/rails.png
create public/stylesheets
create public/stylesheets/.gitkeep
create public/javascripts
create public/javascripts/prototype.js
create public/javascripts/dragdrop.js
create public/javascripts/rails.js
create public/javascripts/effects.js
create public/javascripts/controls.js
create public/javascripts/application.js
create script
create script/rails
create test
create test/test_helper.rb
create test/performance/browsing_test.rb
create test/fixtures
create test/unit
create test/functional
create test/integration
create tmp
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create vendor/plugins
create vendor/plugins/.gitkeep
bundle install
Resolving dependencies
Installing rake (0.8.7) from system gems
Installing abstract (1.0.0) from system gems
Installing builder (2.1.2) from system gems
Installing i18n (0.3.6.pre) from system gems
Installing memcache-client (1.8.1) from system gems
Installing tzinfo (0.3.17) from system gems
Installing activesupport (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing activemodel (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing erubis (2.6.5) from system gems
Installing rack (1.1.0) from system gems
Installing rack-mount (0.6.1) from system gems
Installing rack-test (0.5.3) from system gems
Installing actionpack (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing mime-types (1.16) from system gems
Installing mail (2.1.3) from system gems
Installing text-hyphen (1.0.0) from system gems
Installing text-format (1.0.0) from system gems
Installing actionmailer (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing arel (0.3.1) from system gems
Installing activerecord (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing activeresource (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing bundler (0.9.12) from system gems
Installing thor (0.13.4) from system gems
Installing railties (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing rails (3.0.0.beta1) from source code at /home/rubys/git/rails
Installing sqlite3-ruby (1.2.5) from system gems
Your bundle is complete!
edit config/routes.rb
Routing::Application.routes.draw do |map|
# ...
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
match ':controller(/:action(/:id(.:format)))'
end
rails generate controller store index add_to_cart
create app/controllers/store_controller.rb
route get "/store/add_to_cart" => "store#add_to_cart"
route get "/store/index" => "store#index"
invoke erb
create app/views/store
create app/views/store/index.html.erb
create app/views/store/add_to_cart.html.erb
invoke test_unit
create test/functional/store_controller_test.rb
invoke helper
create app/helpers/store_helper.rb
invoke test_unit
create test/unit/helpers/store_helper_test.rb
cp -v /home/rubys/git/awdwr/data/routing/* config
`/home/rubys/git/awdwr/data/routing/routes.rb' -> `config/routes.rb'
`/home/rubys/git/awdwr/data/routing/routes_with_conditions.rb' -> `config/routes_with_conditions.rb'
`/home/rubys/git/awdwr/data/routing/routes_with_names.rb' -> `config/routes_with_names.rb'
`/home/rubys/git/awdwr/data/routing/routing_conditions_test.rb' -> `config/routing_conditions_test.rb'
`/home/rubys/git/awdwr/data/routing/routing_test.rb' -> `config/routing_test.rb'
mv -v config/*_test.rb test/unit
`config/routing_conditions_test.rb' -> `test/unit/routing_conditions_test.rb'
`config/routing_test.rb' -> `test/unit/routing_test.rb'
rake db:schema:dump
(in /home/rubys/git/awdwr/work/routing)
rake test
(in /home/rubys/git/awdwr/work/routing)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from /home/rubys/git/awdwr/work/routing/config/routes.rb:3)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes.rb:3)
Loaded suite /home/rubys/.rvm/gems/ruby-1.8.7-p249%global/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes.rb:3)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes.rb:3)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes.rb:3)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes.rb:3)
.....
Finished in 0.286362 seconds.
5 tests, 29 assertions, 0 failures, 0 errors
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from ./config/routes_with_conditions.rb:1)
DEPRECATION WARNING: ActionController::Routing::Routes is deprecated. Instead, use Rails.application.routes. (called from /home/rubys/git/awdwr/work/routing/config/routes.rb:3)
Loaded suite /home/rubys/.rvm/gems/ruby-1.8.7-p249%global/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
..
Finished in 0.24377 seconds.
2 tests, 2 assertions, 0 failures, 0 errors