has_many_polymorphs 2.10 → 2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +2 -0
  3. data/Manifest +191 -56
  4. data/TODO +1 -0
  5. data/examples/hmph.rb +69 -0
  6. data/generators/commenting/commenting_generator.rb +94 -0
  7. data/generators/commenting/templates/comment.rb +33 -0
  8. data/generators/commenting/templates/comment_test.rb +12 -0
  9. data/generators/commenting/templates/commenting.rb +13 -0
  10. data/generators/commenting/templates/commenting_extensions.rb +30 -0
  11. data/generators/commenting/templates/commenting_test.rb +30 -0
  12. data/generators/commenting/templates/commentings.yml +23 -0
  13. data/generators/commenting/templates/comments.yml +13 -0
  14. data/generators/commenting/templates/migration.rb +28 -0
  15. data/generators/tagging/templates/tagging_extensions.rb +4 -8
  16. data/has_many_polymorphs.gemspec +19 -12
  17. data/lib/has_many_polymorphs.rb +3 -4
  18. data/lib/has_many_polymorphs/autoload.rb +4 -4
  19. data/lib/has_many_polymorphs/class_methods.rb +8 -8
  20. data/lib/has_many_polymorphs/debugging_tools.rb +2 -0
  21. data/lib/has_many_polymorphs/dependencies.rb +9 -4
  22. data/lib/has_many_polymorphs/support_methods.rb +3 -1
  23. data/test/fixtures/{aquatic/fish.yml → fish.yml} +0 -0
  24. data/test/fixtures/{aquatic/little_whale_pupils.yml → little_whale_pupils.yml} +0 -0
  25. data/test/fixtures/{aquatic/whales.yml → whales.yml} +0 -0
  26. data/test/integration/app/README +182 -0
  27. data/test/integration/app/Rakefile +19 -0
  28. data/test/integration/app/app/controllers/addresses_controller.rb +85 -0
  29. data/test/integration/app/app/controllers/application.rb +7 -0
  30. data/test/integration/app/app/controllers/sellers_controller.rb +85 -0
  31. data/test/integration/app/app/controllers/states_controller.rb +85 -0
  32. data/test/integration/app/app/controllers/users_controller.rb +85 -0
  33. data/test/integration/app/app/helpers/addresses_helper.rb +2 -0
  34. data/test/integration/app/app/helpers/application_helper.rb +3 -0
  35. data/test/integration/app/app/helpers/sellers_helper.rb +28 -0
  36. data/test/integration/app/app/helpers/states_helper.rb +2 -0
  37. data/test/integration/app/app/helpers/users_helper.rb +2 -0
  38. data/test/integration/app/app/models/address.rb +4 -0
  39. data/test/integration/app/app/models/citation.rb +3 -0
  40. data/test/integration/app/app/models/citations_item.rb +4 -0
  41. data/test/integration/app/app/models/seller.rb +4 -0
  42. data/test/integration/app/app/models/state.rb +3 -0
  43. data/test/integration/app/app/models/user.rb +4 -0
  44. data/test/integration/app/app/views/addresses/edit.html.erb +12 -0
  45. data/test/integration/app/app/views/addresses/index.html.erb +18 -0
  46. data/test/integration/app/app/views/addresses/new.html.erb +11 -0
  47. data/test/integration/app/app/views/addresses/show.html.erb +3 -0
  48. data/test/integration/app/app/views/layouts/addresses.html.erb +17 -0
  49. data/test/integration/app/app/views/layouts/sellers.html.erb +17 -0
  50. data/test/integration/app/app/views/layouts/states.html.erb +17 -0
  51. data/test/integration/app/app/views/layouts/users.html.erb +17 -0
  52. data/test/integration/app/app/views/sellers/edit.html.erb +12 -0
  53. data/test/integration/app/app/views/sellers/index.html.erb +20 -0
  54. data/test/integration/app/app/views/sellers/new.html.erb +11 -0
  55. data/test/integration/app/app/views/sellers/show.html.erb +3 -0
  56. data/test/integration/app/app/views/states/edit.html.erb +12 -0
  57. data/test/integration/app/app/views/states/index.html.erb +19 -0
  58. data/test/integration/app/app/views/states/new.html.erb +11 -0
  59. data/test/integration/app/app/views/states/show.html.erb +3 -0
  60. data/test/integration/app/app/views/users/edit.html.erb +12 -0
  61. data/test/integration/app/app/views/users/index.html.erb +22 -0
  62. data/test/integration/app/app/views/users/new.html.erb +11 -0
  63. data/test/integration/app/app/views/users/show.html.erb +3 -0
  64. data/test/integration/app/config/boot.rb +45 -0
  65. data/test/integration/app/config/database.yml +21 -0
  66. data/test/integration/app/config/environment.rb +13 -0
  67. data/test/integration/app/config/environments/development.rb +7 -0
  68. data/test/integration/app/config/environments/production.rb +18 -0
  69. data/test/integration/app/config/environments/test.rb +19 -0
  70. data/test/integration/app/config/locomotive.yml +6 -0
  71. data/test/integration/app/config/routes.rb +33 -0
  72. data/test/integration/app/config/ultrasphinx/default.base +56 -0
  73. data/test/integration/app/config/ultrasphinx/development.conf.canonical +155 -0
  74. data/test/integration/app/db/migrate/001_create_users.rb +16 -0
  75. data/test/integration/app/db/migrate/002_create_sellers.rb +14 -0
  76. data/test/integration/app/db/migrate/003_create_addresses.rb +19 -0
  77. data/test/integration/app/db/migrate/004_create_states.rb +12 -0
  78. data/test/integration/app/db/migrate/005_add_capitalization_to_seller.rb +9 -0
  79. data/test/integration/app/db/migrate/006_add_deleted_to_user.rb +9 -0
  80. data/test/integration/app/db/migrate/007_add_lat_and_long_to_address.rb +11 -0
  81. data/test/integration/app/db/migrate/008_create_citations.rb +12 -0
  82. data/test/integration/app/db/migrate/009_create_citations_items.rb +14 -0
  83. data/test/integration/app/db/schema.rb +144 -0
  84. data/test/integration/app/doc/README_FOR_APP +2 -0
  85. data/test/integration/app/generated_models/aquatic_fish.rb +109 -0
  86. data/test/integration/app/generated_models/aquatic_pupils_whale.rb +13 -0
  87. data/test/integration/app/generated_models/aquatic_whale.rb +42 -0
  88. data/test/integration/app/generated_models/beautiful_fight_relationship.rb +25 -0
  89. data/test/integration/app/generated_models/citation.rb +40 -0
  90. data/test/integration/app/generated_models/citations_item.rb +12 -0
  91. data/test/integration/app/generated_models/dog.rb +183 -0
  92. data/test/integration/app/generated_models/eaters_foodstuff.rb +13 -0
  93. data/test/integration/app/generated_models/frog.rb +78 -0
  94. data/test/integration/app/generated_models/kitten.rb +161 -0
  95. data/test/integration/app/generated_models/parentship.rb +14 -0
  96. data/test/integration/app/generated_models/person.rb +53 -0
  97. data/test/integration/app/generated_models/petfood.rb +125 -0
  98. data/test/integration/app/generated_models/polymorph_test_some_model.rb +25 -0
  99. data/test/integration/app/generated_models/seller.rb +30 -0
  100. data/test/integration/app/generated_models/tabby.rb +26 -0
  101. data/test/integration/app/generated_models/user.rb +34 -0
  102. data/test/integration/app/generated_models/wild_boar.rb +87 -0
  103. data/test/integration/app/generators/commenting_generator_test.rb +83 -0
  104. data/test/integration/app/public/404.html +30 -0
  105. data/test/integration/app/public/500.html +30 -0
  106. data/test/integration/app/public/dispatch.cgi +10 -0
  107. data/test/integration/app/public/dispatch.fcgi +24 -0
  108. data/test/integration/app/public/dispatch.rb +10 -0
  109. data/test/integration/app/public/favicon.ico +0 -0
  110. data/test/integration/app/public/images/rails.png +0 -0
  111. data/test/integration/app/public/index.html +277 -0
  112. data/test/integration/app/public/javascripts/application.js +2 -0
  113. data/test/integration/app/public/javascripts/controls.js +833 -0
  114. data/test/integration/app/public/javascripts/dragdrop.js +942 -0
  115. data/test/integration/app/public/javascripts/effects.js +1088 -0
  116. data/test/integration/app/public/javascripts/prototype.js +2515 -0
  117. data/test/integration/app/public/robots.txt +1 -0
  118. data/test/integration/app/public/stylesheets/scaffold.css +74 -0
  119. data/test/integration/app/script/about +3 -0
  120. data/test/integration/app/script/breakpointer +3 -0
  121. data/test/integration/app/script/console +3 -0
  122. data/test/integration/app/script/destroy +3 -0
  123. data/test/integration/app/script/generate +3 -0
  124. data/test/integration/app/script/performance/benchmarker +3 -0
  125. data/test/integration/app/script/performance/profiler +3 -0
  126. data/test/integration/app/script/plugin +3 -0
  127. data/test/integration/app/script/process/inspector +3 -0
  128. data/test/integration/app/script/process/reaper +3 -0
  129. data/test/integration/app/script/process/spawner +3 -0
  130. data/test/integration/app/script/runner +3 -0
  131. data/test/integration/app/script/server +3 -0
  132. data/test/integration/app/test/fixtures/addresses.yml +13 -0
  133. data/test/integration/app/test/fixtures/citations.yml +9 -0
  134. data/test/integration/app/test/fixtures/citations_items.yml +9 -0
  135. data/test/integration/app/test/fixtures/sellers.yml +10 -0
  136. data/test/integration/app/test/fixtures/states.yml +216 -0
  137. data/test/integration/app/test/fixtures/users.yml +11 -0
  138. data/test/integration/app/test/functional/addresses_controller_test.rb +57 -0
  139. data/test/integration/app/test/functional/sellers_controller_test.rb +57 -0
  140. data/test/integration/app/test/functional/states_controller_test.rb +57 -0
  141. data/test/integration/app/test/functional/users_controller_test.rb +57 -0
  142. data/test/integration/app/test/test_helper.rb +28 -0
  143. data/test/integration/app/test/unit/address_test.rb +10 -0
  144. data/test/integration/app/test/unit/citation_test.rb +10 -0
  145. data/test/integration/app/test/unit/citations_item_test.rb +10 -0
  146. data/test/integration/app/test/unit/seller_test.rb +10 -0
  147. data/test/integration/app/test/unit/state_test.rb +10 -0
  148. data/test/integration/app/test/unit/user_test.rb +10 -0
  149. data/test/models/aquatic/fish.rb +2 -1
  150. data/test/models/aquatic/whale.rb +2 -0
  151. data/test/setup.rb +10 -0
  152. data/test/test_all.rb +16 -0
  153. data/test/test_helper.rb +16 -12
  154. data/test/unit/polymorph_test.rb +35 -34
  155. metadata +239 -98
  156. metadata.gz.sig +0 -0
@@ -0,0 +1,12 @@
1
+ <h1>Editing address</h1>
2
+
3
+ <%= error_messages_for :address %>
4
+
5
+ <% form_for(@address) do |f| %>
6
+ <p>
7
+ <%= f.submit "Update" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Show', @address %> |
12
+ <%= link_to 'Back', addresses_path %>
@@ -0,0 +1,18 @@
1
+ <h1>Listing addresses</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ </tr>
6
+
7
+ <% for address in @addresses %>
8
+ <tr>
9
+ <td><%= link_to 'Show', address %></td>
10
+ <td><%= link_to 'Edit', edit_address_path(address) %></td>
11
+ <td><%= link_to 'Destroy', address, :confirm => 'Are you sure?', :method => :delete %></td>
12
+ </tr>
13
+ <% end %>
14
+ </table>
15
+
16
+ <br />
17
+
18
+ <%= link_to 'New address', new_address_path %>
@@ -0,0 +1,11 @@
1
+ <h1>New address</h1>
2
+
3
+ <%= error_messages_for :address %>
4
+
5
+ <% form_for(@address) do |f| %>
6
+ <p>
7
+ <%= f.submit "Create" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Back', addresses_path %>
@@ -0,0 +1,3 @@
1
+
2
+ <%= link_to 'Edit', edit_address_path(@address) %> |
3
+ <%= link_to 'Back', addresses_path %>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
+ <title>Addresses: <%= controller.action_name %></title>
8
+ <%= stylesheet_link_tag 'scaffold' %>
9
+ </head>
10
+ <body>
11
+
12
+ <p style="color: green"><%= flash[:notice] %></p>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
+ <title>Sellers: <%= controller.action_name %></title>
8
+ <%= stylesheet_link_tag 'scaffold' %>
9
+ </head>
10
+ <body>
11
+
12
+ <p style="color: green"><%= flash[:notice] %></p>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
+ <title>States: <%= controller.action_name %></title>
8
+ <%= stylesheet_link_tag 'scaffold' %>
9
+ </head>
10
+ <body>
11
+
12
+ <p style="color: green"><%= flash[:notice] %></p>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
+ <title>Users: <%= controller.action_name %></title>
8
+ <%= stylesheet_link_tag 'scaffold' %>
9
+ </head>
10
+ <body>
11
+
12
+ <p style="color: green"><%= flash[:notice] %></p>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,12 @@
1
+ <h1>Editing seller</h1>
2
+
3
+ <%= error_messages_for :seller %>
4
+
5
+ <% form_for(@seller) do |f| %>
6
+ <p>
7
+ <%= f.submit "Update" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Show', @seller %> |
12
+ <%= link_to 'Back', sellers_path %>
@@ -0,0 +1,20 @@
1
+ <h1>Listing sellers</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ </tr>
6
+
7
+ <% for seller in @sellers %>
8
+ <tr>
9
+ <td><%= h(seller.company_name) %></td>
10
+ <td><%= h(display_address(seller)) %></td>
11
+ <td><%= link_to 'Show', seller %></td>
12
+ <td><%= link_to 'Edit', edit_seller_path(seller) %></td>
13
+ <td><%= link_to 'Destroy', seller, :confirm => 'Are you sure?', :method => :delete %></td>
14
+ </tr>
15
+ <% end %>
16
+ </table>
17
+
18
+ <br />
19
+
20
+ <%= link_to 'New seller', new_seller_path %>
@@ -0,0 +1,11 @@
1
+ <h1>New seller</h1>
2
+
3
+ <%= error_messages_for :seller %>
4
+
5
+ <% form_for(@seller) do |f| %>
6
+ <p>
7
+ <%= f.submit "Create" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Back', sellers_path %>
@@ -0,0 +1,3 @@
1
+
2
+ <%= link_to 'Edit', edit_seller_path(@seller) %> |
3
+ <%= link_to 'Back', sellers_path %>
@@ -0,0 +1,12 @@
1
+ <h1>Editing state</h1>
2
+
3
+ <%= error_messages_for :state %>
4
+
5
+ <% form_for(@state) do |f| %>
6
+ <p>
7
+ <%= f.submit "Update" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Show', @state %> |
12
+ <%= link_to 'Back', states_path %>
@@ -0,0 +1,19 @@
1
+ <h1>Listing states</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ </tr>
6
+
7
+ <% for state in @states %>
8
+ <tr>
9
+ <td><%= state.name %></td>
10
+ <td><%= link_to 'Show', state %></td>
11
+ <td><%= link_to 'Edit', edit_state_path(state) %></td>
12
+ <td><%= link_to 'Destroy', state, :confirm => 'Are you sure?', :method => :delete %></td>
13
+ </tr>
14
+ <% end %>
15
+ </table>
16
+
17
+ <br />
18
+
19
+ <%= link_to 'New state', new_state_path %>
@@ -0,0 +1,11 @@
1
+ <h1>New state</h1>
2
+
3
+ <%= error_messages_for :state %>
4
+
5
+ <% form_for(@state) do |f| %>
6
+ <p>
7
+ <%= f.submit "Create" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Back', states_path %>
@@ -0,0 +1,3 @@
1
+
2
+ <%= link_to 'Edit', edit_state_path(@state) %> |
3
+ <%= link_to 'Back', states_path %>
@@ -0,0 +1,12 @@
1
+ <h1>Editing user</h1>
2
+
3
+ <%= error_messages_for :user %>
4
+
5
+ <% form_for(@user) do |f| %>
6
+ <p>
7
+ <%= f.submit "Update" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Show', @user %> |
12
+ <%= link_to 'Back', users_path %>
@@ -0,0 +1,22 @@
1
+ <h1>Listing users</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ </tr>
6
+
7
+ <% for user in @users %>
8
+ <tr>
9
+ <td><%= h(user.login) %></td>
10
+ <td><%= h(user.address.line_1) %></td>
11
+ <td><%= h(user.address.city) %></td>
12
+ <td><%= h(user.address.state.name) %></td>
13
+ <td><%= link_to 'Show', user %></td>
14
+ <td><%= link_to 'Edit', edit_user_path(user) %></td>
15
+ <td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
16
+ </tr>
17
+ <% end %>
18
+ </table>
19
+
20
+ <br />
21
+
22
+ <%= link_to 'New user', new_user_path %>
@@ -0,0 +1,11 @@
1
+ <h1>New user</h1>
2
+
3
+ <%= error_messages_for :user %>
4
+
5
+ <% form_for(@user) do |f| %>
6
+ <p>
7
+ <%= f.submit "Create" %>
8
+ </p>
9
+ <% end %>
10
+
11
+ <%= link_to 'Back', users_path %>
@@ -0,0 +1,3 @@
1
+
2
+ <%= link_to 'Edit', edit_user_path(@user) %> |
3
+ <%= link_to 'Back', users_path %>
@@ -0,0 +1,45 @@
1
+ # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
2
+
3
+ unless defined?(RAILS_ROOT)
4
+ root_path = File.join(File.dirname(__FILE__), '..')
5
+
6
+ unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
7
+ require 'pathname'
8
+ root_path = Pathname.new(root_path).cleanpath(true).to_s
9
+ end
10
+
11
+ RAILS_ROOT = root_path
12
+ end
13
+
14
+ unless defined?(Rails::Initializer)
15
+ if File.directory?("#{RAILS_ROOT}/vendor/rails")
16
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
17
+ else
18
+ require 'rubygems'
19
+
20
+ environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
21
+ environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
22
+ rails_gem_version = $1
23
+
24
+ if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
25
+ # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems
26
+ rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |g| g.version.version }.last
27
+
28
+ if rails_gem
29
+ gem "rails", "=#{rails_gem.version.version}"
30
+ require rails_gem.full_gem_path + '/lib/initializer'
31
+ else
32
+ STDERR.puts %(Cannot find gem for Rails ~>#{version}.0:
33
+ Install the missing gem with 'gem install -v=#{version} rails', or
34
+ change environment.rb to define RAILS_GEM_VERSION with your desired version.
35
+ )
36
+ exit 1
37
+ end
38
+ else
39
+ gem "rails"
40
+ require 'initializer'
41
+ end
42
+ end
43
+
44
+ Rails::Initializer.run(:set_load_path)
45
+ end
@@ -0,0 +1,21 @@
1
+
2
+ development:
3
+ adapter: mysql
4
+ host: localhost
5
+ database: hmp_development
6
+ username: root
7
+ password:
8
+
9
+ test:
10
+ adapter: mysql
11
+ host: localhost
12
+ database: hmp_test
13
+ username: root
14
+ password:
15
+
16
+ production:
17
+ adapter: mysql
18
+ host: localhost
19
+ database: hmp_production
20
+ username: root
21
+ password:
@@ -0,0 +1,13 @@
1
+
2
+ require File.join(File.dirname(__FILE__), 'boot')
3
+
4
+ Rails::Initializer.run do |config|
5
+
6
+ if config.action_controller.respond_to? :"session="
7
+ config.action_controller.session = { :session_key => "_myapp_session", :secret => "this is a super secret phrase" }
8
+ end
9
+
10
+ config.load_paths << "#{RAILS_ROOT}/app/models/person" # moduleless model path
11
+ end
12
+
13
+ # Dependencies.log_activity = true
@@ -0,0 +1,7 @@
1
+ config.cache_classes = false
2
+ config.whiny_nils = true
3
+ config.action_controller.consider_all_requests_local = true
4
+ config.action_controller.perform_caching = false
5
+ config.action_view.cache_template_extensions = false
6
+ config.action_view.debug_rjs = true
7
+ config.action_mailer.raise_delivery_errors = false
@@ -0,0 +1,18 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # The production environment is meant for finished, "live" apps.
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Use a different logger for distributed setups
8
+ # config.logger = SyslogLogger.new
9
+
10
+ # Full error reports are disabled and caching is turned on
11
+ config.action_controller.consider_all_requests_local = false
12
+ config.action_controller.perform_caching = true
13
+
14
+ # Enable serving of images, stylesheets, and javascripts from an asset server
15
+ # config.action_controller.asset_host = "http://assets.example.com"
16
+
17
+ # Disable delivery errors, bad email addresses will be ignored
18
+ # config.action_mailer.raise_delivery_errors = false
@@ -0,0 +1,19 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+ config.cache_classes = true
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.action_controller.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Tell ActionMailer not to deliver emails to the real world.
17
+ # The :test delivery method accumulates sent emails in the
18
+ # ActionMailer::Base.deliveries array.
19
+ config.action_mailer.delivery_method = :test
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: development
3
+ runs_at_launch: 0
4
+ identifier: testapp
5
+ port: 3005
6
+ bundle: /Applications/Locomotive2/Bundles/rmagickRailsMar2007_i386.locobundle
@@ -0,0 +1,33 @@
1
+ ActionController::Routing::Routes.draw do |map|
2
+ map.resources :states
3
+
4
+ map.resources :states
5
+
6
+ map.resources :addresses
7
+
8
+ map.resources :sellers
9
+
10
+ map.resources :users
11
+
12
+ # The priority is based upon order of creation: first created -> highest priority.
13
+
14
+ # Sample of regular route:
15
+ # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
16
+ # Keep in mind you can assign values other than :controller and :action
17
+
18
+ # Sample of named route:
19
+ # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
20
+ # This route can be invoked with purchase_url(:id => product.id)
21
+
22
+ # You can have the root of your site routed by hooking up ''
23
+ # -- just remember to delete public/index.html.
24
+ # map.connect '', :controller => "welcome"
25
+
26
+ # Allow downloading Web Service WSDL as a file with an extension
27
+ # instead of a file named 'wsdl'
28
+ map.connect ':controller/service.wsdl', :action => 'wsdl'
29
+
30
+ # Install the default route as the lowest priority.
31
+ map.connect ':controller/:action/:id.:format'
32
+ map.connect ':controller/:action/:id'
33
+ end