tartarus 1.0.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/.gitignore +1 -0
  2. data/.rvmrc +2 -0
  3. data/Gemfile +10 -0
  4. data/Gemfile.lock +104 -0
  5. data/README.rdoc +30 -4
  6. data/Rakefile +10 -28
  7. data/{generators → lib/generators}/tartarus/USAGE +4 -3
  8. data/lib/generators/tartarus/tartarus_generator.rb +36 -0
  9. data/{generators → lib/generators}/tartarus/templates/app/controllers/exceptions_controller.rb +0 -0
  10. data/{generators → lib/generators}/tartarus/templates/app/models/logged_exception.rb +0 -0
  11. data/{generators → lib/generators}/tartarus/templates/app/views/exceptions/_exception.html.erb +0 -0
  12. data/{generators → lib/generators}/tartarus/templates/app/views/exceptions/details.html.erb +0 -0
  13. data/{generators → lib/generators}/tartarus/templates/app/views/exceptions/index.html.erb +0 -0
  14. data/{generators → lib/generators}/tartarus/templates/config/exceptions.yml +0 -0
  15. data/{generators → lib/generators}/tartarus/templates/db/migrate/add_logged_exceptions.rb +0 -0
  16. data/{generators → lib/generators}/tartarus/templates/public/javascripts/tartarus.jquery.js +0 -0
  17. data/{generators → lib/generators}/tartarus/templates/public/stylesheets/tartarus.css +0 -0
  18. data/{generators → lib/generators}/tartarus/templates/spec/controllers/exceptions_controller_spec.rb +1 -1
  19. data/{generators → lib/generators}/tartarus/templates/spec/models/logged_exception_spec.rb +0 -0
  20. data/lib/tartarus.rb +7 -3
  21. data/lib/tartarus/logger.rb +50 -14
  22. data/lib/tartarus/notifiers/mail.rb +25 -0
  23. data/lib/tartarus/rack.rb +23 -0
  24. data/lib/tartarus/railtie.rb +9 -0
  25. data/lib/tartarus/version.rb +3 -0
  26. data/spec/rails_app/.gitignore +4 -0
  27. data/spec/rails_app/.rspec +1 -0
  28. data/spec/rails_app/Gemfile +13 -0
  29. data/spec/rails_app/Gemfile.lock +99 -0
  30. data/spec/rails_app/README +256 -0
  31. data/spec/rails_app/Rakefile +7 -0
  32. data/spec/rails_app/app/controllers/application_controller.rb +3 -0
  33. data/spec/rails_app/app/controllers/logged_exceptions_controller.rb +31 -0
  34. data/spec/rails_app/app/helpers/application_helper.rb +2 -0
  35. data/spec/{rails → rails_app}/app/models/logged_exception.rb +2 -1
  36. data/spec/rails_app/app/views/layouts/application.html.erb +14 -0
  37. data/spec/rails_app/app/views/logged_exceptions/_exception.html.erb +14 -0
  38. data/spec/rails_app/app/views/logged_exceptions/details.html.erb +86 -0
  39. data/spec/rails_app/app/views/logged_exceptions/index.html.erb +28 -0
  40. data/spec/rails_app/config.ru +4 -0
  41. data/spec/rails_app/config/application.rb +42 -0
  42. data/spec/rails_app/config/boot.rb +13 -0
  43. data/spec/rails_app/config/database.yml +22 -0
  44. data/spec/rails_app/config/environment.rb +5 -0
  45. data/spec/rails_app/config/environments/development.rb +26 -0
  46. data/spec/rails_app/config/environments/production.rb +49 -0
  47. data/spec/rails_app/config/environments/test.rb +35 -0
  48. data/spec/rails_app/config/exceptions.yml +18 -0
  49. data/spec/{rails → rails_app}/config/initializers/backtrace_silencers.rb +2 -2
  50. data/spec/{rails → rails_app}/config/initializers/inflections.rb +1 -1
  51. data/spec/{rails → rails_app}/config/initializers/mime_types.rb +0 -0
  52. data/spec/rails_app/config/initializers/secret_token.rb +7 -0
  53. data/spec/rails_app/config/initializers/session_store.rb +8 -0
  54. data/spec/{rails → rails_app}/config/locales/en.yml +1 -1
  55. data/spec/rails_app/config/routes.rb +58 -0
  56. data/spec/rails_app/db/migrate/20101230191040_add_logged_exception_table.rb +19 -0
  57. data/spec/rails_app/db/schema.rb +28 -0
  58. data/spec/rails_app/db/seeds.rb +7 -0
  59. data/spec/rails_app/doc/README_FOR_APP +2 -0
  60. data/spec/rails_app/lib/tasks/.gitkeep +0 -0
  61. data/spec/rails_app/public/404.html +26 -0
  62. data/spec/rails_app/public/422.html +26 -0
  63. data/spec/rails_app/public/500.html +26 -0
  64. data/spec/rails_app/public/favicon.ico +0 -0
  65. data/spec/rails_app/public/images/rails.png +0 -0
  66. data/spec/rails_app/public/javascripts/application.js +2 -0
  67. data/spec/rails_app/public/javascripts/controls.js +965 -0
  68. data/spec/rails_app/public/javascripts/dragdrop.js +974 -0
  69. data/spec/rails_app/public/javascripts/effects.js +1123 -0
  70. data/spec/rails_app/public/javascripts/prototype.js +6001 -0
  71. data/spec/rails_app/public/javascripts/rails.js +175 -0
  72. data/spec/rails_app/public/javascripts/tartarus.jquery.js +8 -0
  73. data/spec/rails_app/public/robots.txt +5 -0
  74. data/spec/rails_app/public/stylesheets/.gitkeep +0 -0
  75. data/spec/rails_app/public/stylesheets/tartarus.css +26 -0
  76. data/spec/rails_app/script/rails +6 -0
  77. data/spec/rails_app/spec/controllers/logged_exceptions_controller_spec.rb +83 -0
  78. data/spec/rails_app/spec/models/logged_exception_spec.rb +7 -0
  79. data/spec/rails_app/spec/spec_helper.rb +27 -0
  80. data/spec/rails_app/vendor/plugins/.gitkeep +0 -0
  81. data/spec/spec_helper.rb +14 -7
  82. data/spec/tartarus/logger_spec.rb +51 -23
  83. data/spec/tartarus_spec.rb +5 -8
  84. data/tartarus.gemspec +11 -103
  85. metadata +148 -94
  86. data/VERSION +0 -1
  87. data/generators/tartarus/tartarus_generator.rb +0 -50
  88. data/lib/tartarus/notifier.rb +0 -11
  89. data/lib/tartarus/rescue.rb +0 -39
  90. data/rails/init.rb +0 -3
  91. data/spec/rails/app/controllers/application_controller.rb +0 -10
  92. data/spec/rails/config/boot.rb +0 -110
  93. data/spec/rails/config/database.yml +0 -5
  94. data/spec/rails/config/environment.rb +0 -41
  95. data/spec/rails/config/environments/development.rb +0 -17
  96. data/spec/rails/config/environments/production.rb +0 -28
  97. data/spec/rails/config/environments/test.rb +0 -28
  98. data/spec/rails/config/exceptions.yml +0 -9
  99. data/spec/rails/config/initializers/new_rails_defaults.rb +0 -21
  100. data/spec/rails/config/initializers/session_store.rb +0 -15
  101. data/spec/rails/config/routes.rb +0 -43
  102. data/spec/rails/db/test.sqlite3 +0 -0
  103. data/spec/rcov.opts +0 -3
  104. data/spec/spec.opts +0 -4
  105. data/spec/tartarus/rescue_spec.rb +0 -86
  106. data/views/tartarus_notifier/notification.html.erb +0 -9
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.3
@@ -1,50 +0,0 @@
1
- class TartarusGenerator < Rails::Generator::NamedBase
2
- default_options :skip_migration => false
3
-
4
- def initialize(runtime_args, runtime_options = {})
5
- runtime_args << 'LoggedException' if runtime_args.empty?
6
- super
7
- end
8
-
9
- def manifest
10
- record do |m|
11
- puts "\nGenerated files:\n"
12
- # Directories
13
- m.directory "app/views/exceptions"
14
- m.directory "spec/models"
15
- m.directory "spec/controllers"
16
-
17
- # Configuration
18
- m.template 'config/exceptions.yml', 'config/exceptions.yml'
19
-
20
- #Migration
21
- m.migration_template "db/migrate/add_logged_exceptions.rb", "db/migrate", :migration_file_name => "add_#{singular_name}_table"
22
-
23
- # Controllers
24
- m.template 'app/controllers/exceptions_controller.rb', "app/controllers/exceptions_controller.rb"
25
-
26
- # Views
27
- Dir.glob( File.dirname(__FILE__) + '/templates/app/views/exceptions/*.html.erb').each do |path|
28
- view = File.basename( path )
29
- m.file "app/views/exceptions/#{view}", "app/views/exceptions/#{view}"
30
- end
31
-
32
- # Models
33
- m.template 'app/models/logged_exception.rb', "app/models/#{file_name}.rb"
34
-
35
- # Specs
36
- m.template 'spec/models/logged_exception_spec.rb', "spec/models/#{file_name}_spec.rb"
37
- m.template 'spec/controllers/exceptions_controller_spec.rb', 'spec/controllers/exceptions_controller_spec.rb'
38
-
39
- # Public
40
- m.file 'public/javascripts/tartarus.jquery.js', 'public/javascripts/tartarus.jquery.js'
41
- m.file 'public/stylesheets/tartarus.css', 'public/stylesheets/tartarus.css'
42
- end
43
- end
44
-
45
- def after_generate
46
- puts "\nIn order for exceptional to function properly, you'll need to complete the following steps to complete the installation process: \n\n"
47
- puts " 1) Run 'rake db:migrate' to generate the logging table for your model.\n"
48
- puts " 2) Add '/javascripts/tartarus.jquery.js', and 'stylesheets/tartarus.css' to your applications layout.\n"
49
- end
50
- end
@@ -1,11 +0,0 @@
1
- class Tartarus::Notifier < ActionMailer::Base
2
- self.mailer_name = 'tartarus_notifier'
3
- self.view_paths << "#{File.dirname(__FILE__)}/../../views"
4
-
5
- def notification( to, exception )
6
- @recipients = to
7
- @from = Tartarus.configuration['sender']
8
- @subject = "Exception raised at #{exception.controller_path}##{exception.action_name} (#{exception.exception_class}) #{exception.message}"
9
- @body[:exception] = exception
10
- end
11
- end
@@ -1,39 +0,0 @@
1
- module Tartarus::Rescue
2
- def self.included(base)
3
- base.class_eval do
4
- alias_method_chain :rescue_action, :tartarus
5
- end
6
- end
7
-
8
- def rescue_action_with_tartarus(exception)
9
- is_exception = response_code_for_rescue(exception) == :internal_server_error
10
-
11
- if is_exception and Tartarus.logging_enabled?
12
- Tartarus.log(self, exception)
13
- end
14
-
15
- rescue_action_without_tartarus(exception)
16
- end
17
-
18
- def normalize_request_data_for_tartarus
19
- enviroment = request.env.dup
20
- filtered_params = respond_to?(:filter_parameters) ? filter_parameters(request.parameters) : request.parameters.dup
21
-
22
- request_details = {
23
- :enviroment => { :process => $$, :server => `hostname -s`.chomp },
24
- :session => { :variables => enviroment['rack.session'].to_hash, :cookie => enviroment['rack.request.cookie_hash'] },
25
- :http_details => {
26
- :method => request.method.to_s.upcase,
27
- :url => "#{request.protocol}#{request.env["HTTP_HOST"]}#{request.request_uri}",
28
- :format => request.format.to_s,
29
- :parameters => filtered_params
30
- }
31
- }
32
-
33
- enviroment.each_pair do |key, value|
34
- request_details[:enviroment][key.downcase] = value if key.match(/^[A-Z_]*$/)
35
- end
36
-
37
- return request_details
38
- end
39
- end
data/rails/init.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'tartarus'
2
-
3
- ActionController::Base.send(:include, Tartarus::Rescue)
@@ -1,10 +0,0 @@
1
- # Filters added to this controller apply to all controllers in the application.
2
- # Likewise, all the methods added will be available for all controllers.
3
-
4
- class ApplicationController < ActionController::Base
5
- helper :all # include all helpers, all the time
6
- protect_from_forgery # See ActionController::RequestForgeryProtection for details
7
-
8
- # Scrub sensitive parameters from your log
9
- # filter_parameter_logging :password
10
- end
@@ -1,110 +0,0 @@
1
- # Don't change this file!
2
- # Configure your app in config/environment.rb and config/environments/*.rb
3
-
4
- RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
5
-
6
- module Rails
7
- class << self
8
- def boot!
9
- unless booted?
10
- preinitialize
11
- pick_boot.run
12
- end
13
- end
14
-
15
- def booted?
16
- defined? Rails::Initializer
17
- end
18
-
19
- def pick_boot
20
- (vendor_rails? ? VendorBoot : GemBoot).new
21
- end
22
-
23
- def vendor_rails?
24
- File.exist?("#{RAILS_ROOT}/vendor/rails")
25
- end
26
-
27
- def preinitialize
28
- load(preinitializer_path) if File.exist?(preinitializer_path)
29
- end
30
-
31
- def preinitializer_path
32
- "#{RAILS_ROOT}/config/preinitializer.rb"
33
- end
34
- end
35
-
36
- class Boot
37
- def run
38
- load_initializer
39
- Rails::Initializer.run(:set_load_path)
40
- end
41
- end
42
-
43
- class VendorBoot < Boot
44
- def load_initializer
45
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
46
- Rails::Initializer.run(:install_gem_spec_stubs)
47
- Rails::GemDependency.add_frozen_gem_path
48
- end
49
- end
50
-
51
- class GemBoot < Boot
52
- def load_initializer
53
- self.class.load_rubygems
54
- load_rails_gem
55
- require 'initializer'
56
- end
57
-
58
- def load_rails_gem
59
- if version = self.class.gem_version
60
- gem 'rails', version
61
- else
62
- gem 'rails'
63
- end
64
- rescue Gem::LoadError => load_error
65
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
66
- exit 1
67
- end
68
-
69
- class << self
70
- def rubygems_version
71
- Gem::RubyGemsVersion rescue nil
72
- end
73
-
74
- def gem_version
75
- if defined? RAILS_GEM_VERSION
76
- RAILS_GEM_VERSION
77
- elsif ENV.include?('RAILS_GEM_VERSION')
78
- ENV['RAILS_GEM_VERSION']
79
- else
80
- parse_gem_version(read_environment_rb)
81
- end
82
- end
83
-
84
- def load_rubygems
85
- min_version = '1.3.2'
86
- require 'rubygems'
87
- unless rubygems_version >= min_version
88
- $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
89
- exit 1
90
- end
91
-
92
- rescue LoadError
93
- $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
94
- exit 1
95
- end
96
-
97
- def parse_gem_version(text)
98
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
99
- end
100
-
101
- private
102
- def read_environment_rb
103
- File.read("#{RAILS_ROOT}/config/environment.rb")
104
- end
105
- end
106
- end
107
- end
108
-
109
- # All that for this:
110
- Rails.boot!
@@ -1,5 +0,0 @@
1
- test:
2
- adapter: sqlite3
3
- database: db/test.sqlite3
4
- pool: 5
5
- timeout: 5000
@@ -1,41 +0,0 @@
1
- # Be sure to restart your server when you modify this file
2
-
3
- # Specifies gem version of Rails to use when vendor/rails is not present
4
- RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
5
-
6
- # Bootstrap the Rails environment, frameworks, and default configuration
7
- require File.join(File.dirname(__FILE__), 'boot')
8
-
9
- Rails::Initializer.run do |config|
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Add additional load paths for your own custom dirs
15
- # config.load_paths += %W( #{RAILS_ROOT}/extras )
16
-
17
- # Specify gems that this application depends on and have them installed with rake gems:install
18
- # config.gem "bj"
19
- # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
20
- # config.gem "sqlite3-ruby", :lib => "sqlite3"
21
- # config.gem "aws-s3", :lib => "aws/s3"
22
-
23
- # Only load the plugins named here, in the order given (default is alphabetical).
24
- # :all can be used as a placeholder for all plugins not explicitly named
25
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
26
-
27
- # Skip frameworks you're not going to use. To use Rails without a database,
28
- # you must remove the Active Record framework.
29
- # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
30
-
31
- # Activate observers that should always be running
32
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
33
-
34
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
35
- # Run "rake -D time" for a list of tasks for finding time zone names.
36
- config.time_zone = 'UTC'
37
-
38
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
39
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
40
- # config.i18n.default_locale = :de
41
- end
@@ -1,17 +0,0 @@
1
- # Settings specified here will take precedence over those in config/environment.rb
2
-
3
- # In the development environment your application's code is reloaded on
4
- # every request. This slows down response time but is perfect for development
5
- # since you don't have to restart the webserver when you make code changes.
6
- config.cache_classes = false
7
-
8
- # Log error messages when you accidentally call methods on nil.
9
- config.whiny_nils = true
10
-
11
- # Show full error reports and disable caching
12
- config.action_controller.consider_all_requests_local = true
13
- config.action_view.debug_rjs = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
@@ -1,28 +0,0 @@
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
- # Full error reports are disabled and caching is turned on
8
- config.action_controller.consider_all_requests_local = false
9
- config.action_controller.perform_caching = true
10
- config.action_view.cache_template_loading = true
11
-
12
- # See everything in the log (default is :info)
13
- # config.log_level = :debug
14
-
15
- # Use a different logger for distributed setups
16
- # config.logger = SyslogLogger.new
17
-
18
- # Use a different cache store in production
19
- # config.cache_store = :mem_cache_store
20
-
21
- # Enable serving of images, stylesheets, and javascripts from an asset server
22
- # config.action_controller.asset_host = "http://assets.example.com"
23
-
24
- # Disable delivery errors, bad email addresses will be ignored
25
- # config.action_mailer.raise_delivery_errors = false
26
-
27
- # Enable threaded mode
28
- # config.threadsafe!
@@ -1,28 +0,0 @@
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
- config.action_view.cache_template_loading = true
16
-
17
- # Disable request forgery protection in test environment
18
- config.action_controller.allow_forgery_protection = false
19
-
20
- # Tell Action Mailer not to deliver emails to the real world.
21
- # The :test delivery method accumulates sent emails in the
22
- # ActionMailer::Base.deliveries array.
23
- config.action_mailer.delivery_method = :test
24
-
25
- # Use SQL instead of Active Record's schema dumper when creating the test database.
26
- # This is necessary if your schema can't be completely dumped by the schema dumper,
27
- # like if you have constraints or database-specific column types
28
- # config.active_record.schema_format = :sql
@@ -1,9 +0,0 @@
1
- development:
2
- enabled: false
3
- logger_class: LoggedException
4
- test:
5
- enabled: false
6
- logger_class: LoggedException
7
- production:
8
- enabled: true
9
- logger_class: LoggedException
@@ -1,21 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # These settings change the behavior of Rails 2 apps and will be defaults
4
- # for Rails 3. You can remove this initializer when Rails 3 is released.
5
-
6
- if defined?(ActiveRecord)
7
- # Include Active Record class name as root for JSON serialized output.
8
- ActiveRecord::Base.include_root_in_json = true
9
-
10
- # Store the full class name (including module namespace) in STI type column.
11
- ActiveRecord::Base.store_full_sti_class = true
12
- end
13
-
14
- ActionController::Routing.generate_best_match = false
15
-
16
- # Use ISO 8601 format for JSON serialized times and dates.
17
- ActiveSupport.use_standard_json_time_format = true
18
-
19
- # Don't escape HTML entities in JSON, leave that for the #json_escape helper.
20
- # if you're including raw json in an HTML page.
21
- ActiveSupport.escape_html_entities_in_json = false
@@ -1,15 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying cookie session data integrity.
4
- # If you change this key, all old sessions will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- ActionController::Base.session = {
8
- :key => '_rails_session',
9
- :secret => 'a83699a376cb974ccfa0c0b7a3739e33d99bf18898217e43161e77e091edf986bae26184b16cb2666557a6a66de441640d557aa67d5ddc7371652cabc3a7ff01'
10
- }
11
-
12
- # Use the database for sessions instead of the cookie-based default,
13
- # which shouldn't be used to store highly confidential information
14
- # (create the session table with "rake db:sessions:create")
15
- # ActionController::Base.session_store = :active_record_store
@@ -1,43 +0,0 @@
1
- ActionController::Routing::Routes.draw do |map|
2
- # The priority is based upon order of creation: first created -> highest priority.
3
-
4
- # Sample of regular route:
5
- # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6
- # Keep in mind you can assign values other than :controller and :action
7
-
8
- # Sample of named route:
9
- # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
10
- # This route can be invoked with purchase_url(:id => product.id)
11
-
12
- # Sample resource route (maps HTTP verbs to controller actions automatically):
13
- # map.resources :products
14
-
15
- # Sample resource route with options:
16
- # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
17
-
18
- # Sample resource route with sub-resources:
19
- # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
20
-
21
- # Sample resource route with more complex sub-resources
22
- # map.resources :products do |products|
23
- # products.resources :comments
24
- # products.resources :sales, :collection => { :recent => :get }
25
- # end
26
-
27
- # Sample resource route within a namespace:
28
- # map.namespace :admin do |admin|
29
- # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
30
- # admin.resources :products
31
- # end
32
-
33
- # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
34
- # map.root :controller => "welcome"
35
-
36
- # See how all your routes lay out with "rake routes"
37
-
38
- # Install the default routes as the lowest priority.
39
- # Note: These default routes make all actions in every controller accessible via GET requests. You should
40
- # consider removing or commenting them out if you're using named routes and resources.
41
- map.connect ':controller/:action/:id'
42
- map.connect ':controller/:action/:id.:format'
43
- end