translatable_routes 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.rdoc +11 -25
  4. data/lib/translatable_routes.rb +0 -1
  5. data/lib/translatable_routes/action_dispatch/mapper.rb +45 -46
  6. data/lib/translatable_routes/action_dispatch/named_route_collection.rb +6 -10
  7. data/lib/translatable_routes/railtie.rb +2 -6
  8. data/lib/translatable_routes/version.rb +1 -1
  9. data/test/dummy/app/controllers/namespace/pages_controller.rb +6 -0
  10. data/test/dummy/app/controllers/namespace/resources_controller.rb +6 -0
  11. data/test/dummy/app/controllers/pages_controller.rb +7 -1
  12. data/test/dummy/app/controllers/resources_controller.rb +1 -1
  13. data/test/dummy/config/application.rb +0 -7
  14. data/test/dummy/config/locales/{en-US.yml → en.yml} +1 -2
  15. data/test/dummy/config/locales/{es-AR.yml → es.yml} +1 -2
  16. data/test/dummy/config/routes.rb +11 -2
  17. data/test/dummy/log/development.log +353 -0
  18. data/test/dummy/log/test.log +5534 -0
  19. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  20. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  21. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  22. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  23. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  24. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  25. data/test/helpers_test.rb +17 -0
  26. data/test/routes_test.rb +28 -87
  27. metadata +31 -40
  28. data/lib/translatable_routes/action_controller/base.rb +0 -38
  29. data/test/dummy/app/controllers/namespace/nested_controller.rb +0 -6
  30. data/test/dummy/app/controllers/namespace/nested_resources_controller.rb +0 -6
  31. data/test/dummy/app/controllers/params_controller.rb +0 -6
  32. data/test/dummy/app/controllers/simple_controller.rb +0 -6
  33. data/test/dummy/app/views/pages/show.html.erb +0 -0
  34. data/test/dummy/config/locales/es-UY.yml +0 -9
  35. data/test/locale_test.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d52f4c0975cb626cba3295c879d05aa6b794cbb
4
- data.tar.gz: 06a26a45a03184dcf3910c79090c2211ab8d8cc9
3
+ metadata.gz: 8b2256f5d2665216448f928603d879d42122731a
4
+ data.tar.gz: f86433d26911d327f2780f7da73574d186f2a2b5
5
5
  SHA512:
6
- metadata.gz: 761514992cebab18345209e9d6c436b7e35e721e53da7289da9a8dc9b3e4e344d567d4add505af2f3720ec3c07ada2cad3712f38e39cf74526e53880d325d649
7
- data.tar.gz: 2387b86d3771b0128702a2b5b084a440a9de24e22f092d523f031f3d040895a5021fb05a575befec4492c20dc51587b2012bb727326e8f9fff2e8ec28fa44ca6
6
+ metadata.gz: 21dc6cad8305d32e45928efa48810a51d4d4f9f268bc35917d83e0c2eb01883fffd898bf774efa0388e33f05b2d1cab881cf9a9c35188863745ab7245fe81407
7
+ data.tar.gz: a6496d72dc80f6d981c4106f782f559338ce2d6fc9f28923577ff59a98784490da4ba7dac800ada613dee7a06cafa667fd2f93b132d3023aaac748d339734d85
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2013 Mattways
1
+ Copyright 2013 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -1,8 +1,8 @@
1
- {<img src="https://codeclimate.com/github/mattways/translatable_routes.png" />}[https://codeclimate.com/github/mattways/translatable_routes] {<img src="https://secure.travis-ci.org/mattways/translatable_routes.png?branch=master" alt="Build Status" />}[https://travis-ci.org/mattways/translatable_routes] {<img src="https://gemnasium.com/mattways/translatable_routes.png" alt="Dependency Status" />}[https://gemnasium.com/mattways/translatable_routes]
1
+ {<img src="https://badge.fury.io/rb/translatable_routes.png" alt="Gem Version" />}[http://badge.fury.io/rb/translatable_routes] {<img src="https://codeclimate.com/github/museways/translatable_routes.png" />}[https://codeclimate.com/github/museways/translatable_routes] {<img src="https://travis-ci.org/museways/translatable_routes.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/translatable_routes] {<img src="https://gemnasium.com/museways/translatable_routes.png" alt="Dependency Status" />}[https://gemnasium.com/museways/translatable_routes]
2
2
 
3
3
  = Translatable Routes
4
4
 
5
- Minimalistic toolkit to handle translatable routes and detect locale from subdomain or prefix.
5
+ Minimalistic toolkit to translate routes.
6
6
 
7
7
  = Install
8
8
 
@@ -10,37 +10,23 @@ Put this line in your Gemfile:
10
10
  gem 'translatable_routes'
11
11
 
12
12
  Then bundle:
13
- $ bundle
13
+ $ bundle
14
14
 
15
15
  = Usage
16
16
 
17
- Choose how the language would be selected in your application.rb:
18
-
19
- To use prefix (default):
20
- config.translatable_routes.selection = :prefix
21
-
22
- To use subdomain:
23
- config.translatable_routes.selection = :subdomain
24
- config.translatable_routes.mapping = {
25
- es: [:ar, :uy]
26
- pt: [:br]
27
- }
28
-
29
- In the case of subdomains you need to name the yml file in your locales dir using this format:
30
- es-UY.yml
31
- es-AR.yml
32
- pt-BR.yml
33
-
34
- Inside each yaml file:
35
- es-UY:
17
+ Inside each locale yaml file:
18
+ es:
36
19
  routes:
37
20
  users: "usuarios"
38
21
  profile: "perfil"
39
22
  login: "entrar"
40
-
23
+
41
24
  (Please note each part of the path it's translated individually, you don't have to put translations for paths like "users/1/profile" just translate "users" and "profile", the plugin will do the rest)
42
25
 
43
- Finally in your routes.rb pass the routes you want to be localized to localize method:
26
+ In your config/routes.rb use the localized block to decide wich routes will be translated:
44
27
  localized do
45
- get 'contact', to: 'static#contact', as: 'contact'
28
+ get 'about' => 'pages#about'
46
29
  end
30
+
31
+ The helpers inside views and controllers will continue working the same but I18n.locale will be use as default locale:
32
+ about_path # /en/about
@@ -1,4 +1,3 @@
1
- require 'translatable_routes/action_controller/base'
2
1
  require 'translatable_routes/action_dispatch/named_route_collection'
3
2
  require 'translatable_routes/action_dispatch/mapper'
4
3
  require 'translatable_routes/railtie'
@@ -2,71 +2,70 @@ module TranslatableRoutes
2
2
  module ActionDispatch
3
3
  module Mapper
4
4
  extend ActiveSupport::Concern
5
-
5
+
6
6
  def localized
7
- @locales = I18n.available_locales.dup
8
- case Rails.application.config.translatable_routes.selection
9
- when :prefix
10
- scope ':locale' do
11
- yield
12
- end
13
- when :subdomain
14
- @locales.shift # For some reason :en is always there
15
- yield
16
- end
17
- @locales = nil # Needed to routes below localize block to work
7
+ @locales = I18n.available_locales
8
+ scope(':locale') { yield }
9
+ @locales = nil
18
10
  end
19
-
11
+
20
12
  def add_route(action, options)
21
13
  if @locales
22
14
  @locales.each do |locale|
23
- path = @scope[:path].dup if @scope[:path].present?
24
- path_names = @scope[:path_names].dup
25
- @scope[:path] = i18n_path(path, locale) if @scope[:path].present?
26
- @scope[:path_names].each { |key, value| @scope[:path_names][key] = I18n.t("routes.#{key}", locale: locale, default: value) }
27
- super(*[i18n_path(action, locale), i18n_options(options, locale)])
28
- @scope[:path] = path if @scope[:path].present?
29
- @scope[:path_names] = path_names
15
+ original_scope_level_resource = @scope[:scope_level_resource].dup if @scope[:scope_level_resource]
16
+ original_path = @scope[:path].dup if @scope[:path]
17
+ original_path_names = @scope[:path_names].dup
18
+ original_options = options.dup
19
+ @scope[:path] = i18n_path(@scope[:path], locale)
20
+ @scope[:path_names].each { |key, value| value = i18n_path(value, locale) }
21
+ options[:path] = i18n_path(options[:path], locale)
22
+ options[:constraints] = { locale: locale.to_s }
23
+ options[:defaults] = { locale: locale.to_s }
24
+ if @scope[:scope_level_resource]
25
+ %w(collection_name member_name).each do |method|
26
+ @scope[:scope_level_resource].class_eval do
27
+ define_method method do
28
+ "#{super()}_#{locale}"
29
+ end
30
+ end
31
+ end
32
+ else
33
+ options[:as] = "#{options[:as] || action}_#{locale}"
34
+ end
35
+ super i18n_path(action, locale), options
36
+ @scope[:scope_level_resource] = original_scope_level_resource if @scope[:scope_level_resource]
37
+ @scope[:path] = original_path if @scope[:path]
38
+ @scope[:path_names] = original_path_names
39
+ options = original_options
40
+ end
41
+ if @scope[:scope_level_resource]
42
+ helper = name_for_action(options[:as], action)
43
+ else
44
+ helper = "#{options[:as] || action}"
45
+ helper = "#{@scope[:as]}_#{helper}" if @scope[:as]
30
46
  end
31
- @set.named_routes.define_i18n_route_helper @scope[:as] ? "#{@scope[:as]}_#{options[:as]}" : options[:as] unless @scope[:scope_level_resource].present?
32
- return
47
+ @set.named_routes.define_i18n_url_helper helper
48
+ else
49
+ super
33
50
  end
34
- super
35
51
  end
36
52
 
37
53
  protected
38
-
39
- def i18n_options(options, locale)
40
- selection = Rails.application.config.translatable_routes.selection
41
- subdomain = locale.to_s.split('-')[1].downcase if selection == :subdomain
42
- changes = { constraints: selection == :prefix ? { locale: locale.to_s } : { subdomain: subdomain.to_s } }
43
- suffix = selection == :prefix ? locale.to_s.gsub('-', '_').downcase : subdomain
44
- if options[:as].present?
45
- changes[:as] = "#{options[:as]}_#{suffix}"
46
- elsif @scope[:scope_level_resource].present?
47
- resource = @scope[:scope_level_resource]
48
- ['singular', 'plural'].each do |context|
49
- resource.instance_variable_set "@original_#{context}".to_sym, resource.send(context.to_sym) unless resource.instance_variable_get "@original_#{context}".to_sym
50
- resource.instance_variable_set "@#{context}".to_sym, "#{resource.instance_variable_get "@original_#{context}".to_sym}_#{suffix}"
51
- end
52
- end
53
- options[:path] = i18n_path(options[:path], locale) if options[:path].present?
54
- options.merge changes
55
- end
56
-
54
+
57
55
  def i18n_path(path, locale)
58
- unless path.is_a? Symbol
56
+ case path
57
+ when String
59
58
  i18n_path = []
60
59
  path.split('/').each do |part|
61
60
  next if part == ''
62
61
  i18n_path << ((part[0] == ':' or part[0] == '*') ? part : I18n.t("routes.#{part}", locale: locale, default: part.gsub(/_/, '-')))
63
- end
62
+ end
64
63
  i18n_path.join('/')
65
- else
64
+ when Symbol
66
65
  path
67
66
  end
68
67
  end
69
-
68
+
70
69
  end
71
70
  end
72
71
  end
@@ -2,20 +2,16 @@ module TranslatableRoutes
2
2
  module ActionDispatch
3
3
  module NamedRouteCollection
4
4
  extend ActiveSupport::Concern
5
-
6
- def define_i18n_route_helper(name)
7
- ['url', 'path'].each do |kind|
8
- helper = :"#{name}_#{kind}"
5
+
6
+ def define_i18n_url_helper(name)
7
+ %w(path url).each do |type|
8
+ helper = :"#{name}_#{type}"
9
9
  @module.remove_possible_method helper
10
10
  @module.module_eval do
11
11
  define_method helper do |*args|
12
12
  options = args.extract_options!
13
- if Rails.application.config.translatable_routes.selection == :subdomain
14
- suffix = (options[:subdomain] ? options[:subdomain] : request.subdomain)
15
- else
16
- suffix = (options[:locale] ? options[:locale] : I18n.locale).to_s.gsub('-', '_').downcase
17
- end
18
- send ("#{name}_" + suffix.to_s + "_#{kind}"), *(args << options)
13
+ suffix = (options[:locale] || I18n.locale).to_s.gsub('-', '_').downcase
14
+ send "#{name}_#{suffix}_#{type}", *(args << options)
19
15
  end
20
16
  end
21
17
  helpers << helper
@@ -1,14 +1,10 @@
1
1
  module TranslatableRoutes
2
2
  class Railtie < Rails::Railtie
3
3
 
4
- config.translatable_routes = ActiveSupport::OrderedOptions.new
5
- config.translatable_routes.selection = :prefix
6
-
7
4
  initializer 'translatable_routes' do
8
- ::ActionDispatch::Routing::Mapper.send :include, TranslatableRoutes::ActionDispatch::Mapper
9
5
  ::ActionDispatch::Routing::RouteSet::NamedRouteCollection.send :include, TranslatableRoutes::ActionDispatch::NamedRouteCollection
10
- ::ActionController::Base.send :include, TranslatableRoutes::ActionController::Base
6
+ ::ActionDispatch::Routing::Mapper.send :include, TranslatableRoutes::ActionDispatch::Mapper
11
7
  end
12
-
8
+
13
9
  end
14
10
  end
@@ -1,5 +1,5 @@
1
1
  module TranslatableRoutes
2
2
 
3
- VERSION = '1.2.0'
3
+ VERSION = '1.3.0'
4
4
 
5
5
  end
@@ -0,0 +1,6 @@
1
+ class Namespace::PagesController < ApplicationController
2
+
3
+ def nested
4
+ end
5
+
6
+ end
@@ -0,0 +1,6 @@
1
+ class Namespace::ResourcesController < ApplicationController
2
+
3
+ def index
4
+ end
5
+
6
+ end
@@ -1,6 +1,12 @@
1
1
  class PagesController < ApplicationController
2
+
3
+ def index
4
+ end
5
+
6
+ def simple
7
+ end
2
8
 
3
- def show
9
+ def complex
4
10
  end
5
11
 
6
12
  end
@@ -1,6 +1,6 @@
1
1
  class ResourcesController < ApplicationController
2
2
 
3
- def show
3
+ def index
4
4
  end
5
5
 
6
6
  end
@@ -18,12 +18,5 @@ module Dummy
18
18
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
20
  # config.i18n.default_locale = :de
21
-
22
- config.translatable_routes.selection = :subdomain
23
- config.translatable_routes.mapping = {
24
- en: :us,
25
- es: [:uy, :ar]
26
- }
27
21
  end
28
22
  end
29
-
@@ -1,4 +1,4 @@
1
- en-US:
1
+ en:
2
2
  routes:
3
3
  new: "new"
4
4
  edit: "edit"
@@ -6,4 +6,3 @@ en-US:
6
6
  nested: "nested"
7
7
  simple: "simple"
8
8
  resources: "resources"
9
- nested_resources: "nested-resources"
@@ -1,4 +1,4 @@
1
- es-AR:
1
+ es:
2
2
  routes:
3
3
  new: "nuevo"
4
4
  edit: "editar"
@@ -6,4 +6,3 @@ es-AR:
6
6
  nested: "anidado"
7
7
  simple: "simple"
8
8
  resources: "recursos"
9
- nested_resources: "recursos-anidados"
@@ -1,7 +1,16 @@
1
1
  Dummy::Application.routes.draw do
2
2
 
3
- root to: 'pages#show'
4
-
3
+ localized do
4
+ root to: 'pages#index'
5
+ namespace :namespace do
6
+ get 'nested', to: 'pages#nested', as: :nested
7
+ resources :resources
8
+ end
9
+ get 'simple', to: 'pages#simple', as: :simple
10
+ get 'complex/:p1/:p2', to: 'pages#complex', as: :complex
11
+ resources :resources
12
+ end
13
+
5
14
  # The priority is based upon order of creation: first created -> highest priority.
6
15
  # See how all your routes lay out with "rake routes".
7
16
 
@@ -5,3 +5,356 @@
5
5
   (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
6
   (0.1ms) SELECT version FROM "schema_migrations"
7
7
   (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
8
+
9
+
10
+ Started GET "/" for 127.0.0.1 at 2014-05-18 18:41:43 -0300
11
+ Processing by Rails::WelcomeController#index as HTML
12
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/templates/rails/welcome/index.html.erb (1.6ms)
13
+ Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms)
14
+
15
+
16
+ Started GET "/" for 127.0.0.1 at 2014-05-18 18:41:50 -0300
17
+ Processing by Rails::WelcomeController#index as HTML
18
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/templates/rails/welcome/index.html.erb (0.1ms)
19
+ Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
20
+
21
+
22
+ Started GET "/" for 127.0.0.1 at 2014-05-18 18:41:50 -0300
23
+ Processing by Rails::WelcomeController#index as HTML
24
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/templates/rails/welcome/index.html.erb (0.0ms)
25
+ Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
26
+
27
+
28
+ Started GET "/es" for 127.0.0.1 at 2014-05-18 18:41:50 -0300
29
+
30
+ ActionController::RoutingError (No route matches [GET] "/es"):
31
+ actionpack (4.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
32
+ actionpack (4.1.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
33
+ railties (4.1.1) lib/rails/rack/logger.rb:38:in `call_app'
34
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `block in call'
35
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
36
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'
37
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `tagged'
38
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `call'
39
+ actionpack (4.1.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
40
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
41
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
42
+ activesupport (4.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
43
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
44
+ actionpack (4.1.1) lib/action_dispatch/middleware/static.rb:64:in `call'
45
+ rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
46
+ railties (4.1.1) lib/rails/engine.rb:514:in `call'
47
+ railties (4.1.1) lib/rails/application.rb:144:in `call'
48
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
49
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
50
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
51
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
52
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
53
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
54
+
55
+
56
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.0ms)
57
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (3.9ms)
58
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (7.3ms)
59
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (41.6ms)
60
+
61
+
62
+ Started GET "/es/tags" for 127.0.0.1 at 2014-05-18 18:41:50 -0300
63
+
64
+ ActionController::RoutingError (No route matches [GET] "/es/tags"):
65
+ actionpack (4.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
66
+ actionpack (4.1.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
67
+ railties (4.1.1) lib/rails/rack/logger.rb:38:in `call_app'
68
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `block in call'
69
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
70
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'
71
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `tagged'
72
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `call'
73
+ actionpack (4.1.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
74
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
75
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
76
+ activesupport (4.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
77
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
78
+ actionpack (4.1.1) lib/action_dispatch/middleware/static.rb:64:in `call'
79
+ rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
80
+ railties (4.1.1) lib/rails/engine.rb:514:in `call'
81
+ railties (4.1.1) lib/rails/application.rb:144:in `call'
82
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
83
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
84
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
85
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
86
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
87
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
88
+
89
+
90
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.1ms)
91
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (3.7ms)
92
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms)
93
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (30.2ms)
94
+
95
+
96
+ Started GET "/es/simple" for 127.0.0.1 at 2014-05-18 18:41:53 -0300
97
+ Processing by SimpleController#show as HTML
98
+ Parameters: {"locale"=>"es"}
99
+ Completed 500 Internal Server Error in 5ms
100
+
101
+ ActionView::MissingTemplate (Missing template simple/show, application/show with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby]}. Searched in:
102
+ * "/Users/Matt/Documents/Museways/Herramientas/Rails/translatable_routes/test/dummy/app/views"
103
+ ):
104
+ actionview (4.1.1) lib/action_view/path_set.rb:46:in `find'
105
+ actionview (4.1.1) lib/action_view/lookup_context.rb:124:in `find'
106
+ actionview (4.1.1) lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
107
+ actionview (4.1.1) lib/action_view/renderer/template_renderer.rb:41:in `determine_template'
108
+ actionview (4.1.1) lib/action_view/renderer/template_renderer.rb:8:in `render'
109
+ actionview (4.1.1) lib/action_view/renderer/renderer.rb:42:in `render_template'
110
+ actionview (4.1.1) lib/action_view/renderer/renderer.rb:23:in `render'
111
+ actionview (4.1.1) lib/action_view/rendering.rb:99:in `_render_template'
112
+ actionpack (4.1.1) lib/action_controller/metal/streaming.rb:217:in `_render_template'
113
+ actionview (4.1.1) lib/action_view/rendering.rb:82:in `render_to_body'
114
+ actionpack (4.1.1) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
115
+ actionpack (4.1.1) lib/action_controller/metal/renderers.rb:32:in `render_to_body'
116
+ actionpack (4.1.1) lib/abstract_controller/rendering.rb:25:in `render'
117
+ actionpack (4.1.1) lib/action_controller/metal/rendering.rb:16:in `render'
118
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
119
+ activesupport (4.1.1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
120
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
121
+ activesupport (4.1.1) lib/active_support/core_ext/benchmark.rb:12:in `ms'
122
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
123
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
124
+ activerecord (4.1.1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
125
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:40:in `render'
126
+ actionpack (4.1.1) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
127
+ actionpack (4.1.1) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
128
+ actionpack (4.1.1) lib/abstract_controller/base.rb:189:in `process_action'
129
+ actionpack (4.1.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
130
+ actionpack (4.1.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
131
+ activesupport (4.1.1) lib/active_support/callbacks.rb:113:in `call'
132
+ activesupport (4.1.1) lib/active_support/callbacks.rb:113:in `call'
133
+ activesupport (4.1.1) lib/active_support/callbacks.rb:229:in `block in halting'
134
+ activesupport (4.1.1) lib/active_support/callbacks.rb:166:in `call'
135
+ activesupport (4.1.1) lib/active_support/callbacks.rb:166:in `block in halting'
136
+ activesupport (4.1.1) lib/active_support/callbacks.rb:86:in `call'
137
+ activesupport (4.1.1) lib/active_support/callbacks.rb:86:in `run_callbacks'
138
+ actionpack (4.1.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
139
+ actionpack (4.1.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
140
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
141
+ activesupport (4.1.1) lib/active_support/notifications.rb:159:in `block in instrument'
142
+ activesupport (4.1.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
143
+ activesupport (4.1.1) lib/active_support/notifications.rb:159:in `instrument'
144
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
145
+ actionpack (4.1.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
146
+ activerecord (4.1.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
147
+ actionpack (4.1.1) lib/abstract_controller/base.rb:136:in `process'
148
+ actionview (4.1.1) lib/action_view/rendering.rb:30:in `process'
149
+ actionpack (4.1.1) lib/action_controller/metal.rb:195:in `dispatch'
150
+ actionpack (4.1.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
151
+ actionpack (4.1.1) lib/action_controller/metal.rb:231:in `block in action'
152
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:80:in `call'
153
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
154
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:48:in `call'
155
+ actionpack (4.1.1) lib/action_dispatch/journey/router.rb:71:in `block in call'
156
+ actionpack (4.1.1) lib/action_dispatch/journey/router.rb:59:in `each'
157
+ actionpack (4.1.1) lib/action_dispatch/journey/router.rb:59:in `call'
158
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:676:in `call'
159
+ rack (1.5.2) lib/rack/etag.rb:23:in `call'
160
+ rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
161
+ rack (1.5.2) lib/rack/head.rb:11:in `call'
162
+ actionpack (4.1.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
163
+ actionpack (4.1.1) lib/action_dispatch/middleware/flash.rb:254:in `call'
164
+ rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
165
+ rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
166
+ actionpack (4.1.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
167
+ activerecord (4.1.1) lib/active_record/query_cache.rb:36:in `call'
168
+ activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
169
+ activerecord (4.1.1) lib/active_record/migration.rb:380:in `call'
170
+ actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
171
+ activesupport (4.1.1) lib/active_support/callbacks.rb:82:in `run_callbacks'
172
+ actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
173
+ actionpack (4.1.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
174
+ actionpack (4.1.1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
175
+ actionpack (4.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
176
+ actionpack (4.1.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
177
+ railties (4.1.1) lib/rails/rack/logger.rb:38:in `call_app'
178
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `block in call'
179
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
180
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'
181
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `tagged'
182
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `call'
183
+ actionpack (4.1.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
184
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
185
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
186
+ activesupport (4.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
187
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
188
+ actionpack (4.1.1) lib/action_dispatch/middleware/static.rb:64:in `call'
189
+ rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
190
+ railties (4.1.1) lib/rails/engine.rb:514:in `call'
191
+ railties (4.1.1) lib/rails/application.rb:144:in `call'
192
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
193
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
194
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
195
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
196
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
197
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
198
+
199
+
200
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb within rescues/layout (0.5ms)
201
+
202
+
203
+ Started GET "/es/simple" for 127.0.0.1 at 2014-05-18 18:53:19 -0300
204
+ Processing by PagesController#simple as HTML
205
+ Parameters: {"locale"=>"es"}
206
+ Completed 500 Internal Server Error in 6ms
207
+
208
+ ActionView::MissingTemplate (Missing template pages/simple, application/simple with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby]}. Searched in:
209
+ * "/Users/Matt/Documents/Museways/Herramientas/Rails/translatable_routes/test/dummy/app/views"
210
+ ):
211
+ actionview (4.1.1) lib/action_view/path_set.rb:46:in `find'
212
+ actionview (4.1.1) lib/action_view/lookup_context.rb:124:in `find'
213
+ actionview (4.1.1) lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
214
+ actionview (4.1.1) lib/action_view/renderer/template_renderer.rb:41:in `determine_template'
215
+ actionview (4.1.1) lib/action_view/renderer/template_renderer.rb:8:in `render'
216
+ actionview (4.1.1) lib/action_view/renderer/renderer.rb:42:in `render_template'
217
+ actionview (4.1.1) lib/action_view/renderer/renderer.rb:23:in `render'
218
+ actionview (4.1.1) lib/action_view/rendering.rb:99:in `_render_template'
219
+ actionpack (4.1.1) lib/action_controller/metal/streaming.rb:217:in `_render_template'
220
+ actionview (4.1.1) lib/action_view/rendering.rb:82:in `render_to_body'
221
+ actionpack (4.1.1) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
222
+ actionpack (4.1.1) lib/action_controller/metal/renderers.rb:32:in `render_to_body'
223
+ actionpack (4.1.1) lib/abstract_controller/rendering.rb:25:in `render'
224
+ actionpack (4.1.1) lib/action_controller/metal/rendering.rb:16:in `render'
225
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
226
+ activesupport (4.1.1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
227
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
228
+ activesupport (4.1.1) lib/active_support/core_ext/benchmark.rb:12:in `ms'
229
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
230
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
231
+ activerecord (4.1.1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
232
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:40:in `render'
233
+ actionpack (4.1.1) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
234
+ actionpack (4.1.1) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
235
+ actionpack (4.1.1) lib/abstract_controller/base.rb:189:in `process_action'
236
+ actionpack (4.1.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
237
+ actionpack (4.1.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
238
+ activesupport (4.1.1) lib/active_support/callbacks.rb:113:in `call'
239
+ activesupport (4.1.1) lib/active_support/callbacks.rb:113:in `call'
240
+ activesupport (4.1.1) lib/active_support/callbacks.rb:229:in `block in halting'
241
+ activesupport (4.1.1) lib/active_support/callbacks.rb:166:in `call'
242
+ activesupport (4.1.1) lib/active_support/callbacks.rb:166:in `block in halting'
243
+ activesupport (4.1.1) lib/active_support/callbacks.rb:86:in `call'
244
+ activesupport (4.1.1) lib/active_support/callbacks.rb:86:in `run_callbacks'
245
+ actionpack (4.1.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
246
+ actionpack (4.1.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
247
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
248
+ activesupport (4.1.1) lib/active_support/notifications.rb:159:in `block in instrument'
249
+ activesupport (4.1.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
250
+ activesupport (4.1.1) lib/active_support/notifications.rb:159:in `instrument'
251
+ actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
252
+ actionpack (4.1.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
253
+ activerecord (4.1.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
254
+ actionpack (4.1.1) lib/abstract_controller/base.rb:136:in `process'
255
+ actionview (4.1.1) lib/action_view/rendering.rb:30:in `process'
256
+ actionpack (4.1.1) lib/action_controller/metal.rb:195:in `dispatch'
257
+ actionpack (4.1.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
258
+ actionpack (4.1.1) lib/action_controller/metal.rb:231:in `block in action'
259
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:80:in `call'
260
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
261
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:48:in `call'
262
+ actionpack (4.1.1) lib/action_dispatch/journey/router.rb:71:in `block in call'
263
+ actionpack (4.1.1) lib/action_dispatch/journey/router.rb:59:in `each'
264
+ actionpack (4.1.1) lib/action_dispatch/journey/router.rb:59:in `call'
265
+ actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:676:in `call'
266
+ rack (1.5.2) lib/rack/etag.rb:23:in `call'
267
+ rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
268
+ rack (1.5.2) lib/rack/head.rb:11:in `call'
269
+ actionpack (4.1.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
270
+ actionpack (4.1.1) lib/action_dispatch/middleware/flash.rb:254:in `call'
271
+ rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
272
+ rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
273
+ actionpack (4.1.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
274
+ activerecord (4.1.1) lib/active_record/query_cache.rb:36:in `call'
275
+ activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
276
+ activerecord (4.1.1) lib/active_record/migration.rb:380:in `call'
277
+ actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
278
+ activesupport (4.1.1) lib/active_support/callbacks.rb:82:in `run_callbacks'
279
+ actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
280
+ actionpack (4.1.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
281
+ actionpack (4.1.1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
282
+ actionpack (4.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
283
+ actionpack (4.1.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
284
+ railties (4.1.1) lib/rails/rack/logger.rb:38:in `call_app'
285
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `block in call'
286
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
287
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'
288
+ activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `tagged'
289
+ railties (4.1.1) lib/rails/rack/logger.rb:20:in `call'
290
+ actionpack (4.1.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
291
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
292
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
293
+ activesupport (4.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
294
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
295
+ actionpack (4.1.1) lib/action_dispatch/middleware/static.rb:64:in `call'
296
+ rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
297
+ railties (4.1.1) lib/rails/engine.rb:514:in `call'
298
+ railties (4.1.1) lib/rails/application.rb:144:in `call'
299
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
300
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
301
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
302
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
303
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
304
+ /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
305
+
306
+
307
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb within rescues/layout (1.2ms)
308
+
309
+
310
+ Started GET "/es/simple" for 127.0.0.1 at 2014-05-18 18:54:11 -0300
311
+ Processing by PagesController#simple as HTML
312
+ Parameters: {"locale"=>"es"}
313
+ Completed 500 Internal Server Error in 0ms
314
+
315
+ NoMethodError (undefined method `[]' for nil:NilClass):
316
+ app/controllers/application_controller.rb:7:in `default_url_options'
317
+ app/controllers/pages_controller.rb:4:in `simple'
318
+
319
+
320
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.6ms)
321
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.0ms)
322
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (9.9ms)
323
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (23.5ms)
324
+
325
+
326
+ Started GET "/es/simple" for 127.0.0.1 at 2014-05-18 18:54:29 -0300
327
+ Processing by PagesController#simple as HTML
328
+ Parameters: {"locale"=>"es"}
329
+ Completed 500 Internal Server Error in 1ms
330
+
331
+ ActionController::UrlGenerationError (No route matches {:action=>"simple", :controller=>"pages", :locale=>#<ActionDispatch::Request:0x007f9e0938fb68 @env={"GATEWAY_INTERFACE"=>"CGI/1.1", "PATH_INFO"=>"/es/simple", "QUERY_STRING"=>"", "REMOTE_ADDR"=>"127.0.0.1", "REMOTE_HOST"=>"127.0.0.1", "REQUEST_METHOD"=>"GET", "REQUEST_URI"=>"http://localhost:3000/es/simple", "SCRIPT_NAME"=>"", "SERVER_NAME"=>"localhost", "SERVER_PORT"=>"3000", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/2.1.1/2014-02-24)", "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate", "HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14", "HTTP_ACCEPT_LANGUAGE"=>"es-es", "HTTP_CACHE_CONTROL"=>"max-age=0", "HTTP_CONNECTION"=>"keep-alive", "rack.version"=>[1, 2], "rack.input"=>#<StringIO:0x007f9e04f00a38>, "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "rack.url_scheme"=>"http", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_PATH"=>"/es/simple", "ORIGINAL_FULLPATH"=>"/es/simple", "ORIGINAL_SCRIPT_NAME"=>"", "action_dispatch.routes"=>#<ActionDispatch::Routing::RouteSet:0x007f9e03dd6898>, "action_dispatch.parameter_filter"=>[:password], "action_dispatch.redirect_filter"=>[], "action_dispatch.secret_token"=>nil, "action_dispatch.secret_key_base"=>"94bacb757cb090cba6681745bdf0b277d02b62765f5a593cf267c51ec4d2c138c51a1c414fa82a1d8b5429db29926ec56bcacbab6c2e1e74492c8c0274b65077", "action_dispatch.show_exceptions"=>true, "action_dispatch.show_detailed_exceptions"=>true, "action_dispatch.logger"=>#<ActiveSupport::Logger:0x007f9e03c032f0 @progname=nil, @level=0, @default_formatter=#<Logger::Formatter:0x007f9e03c032a0 @datetime_format=nil>, @formatter=#<ActiveSupport::Logger::SimpleFormatter:0x007f9e03d356c8 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x007f9e03c03188 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<File:/Users/Matt/Documents/Museways/Herramientas/Rails/translatable_routes/test/dummy/log/development.log>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x007f9e03c03160 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x007f9e03c030e8>>>>, "action_dispatch.backtrace_cleaner"=>#<Rails::BacktraceCleaner:0x007f9e090481d0 @filters=[#<Proc:0x007f9e09048108@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/backtrace_cleaner.rb:10>, #<Proc:0x007f9e090480e0@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/backtrace_cleaner.rb:11>, #<Proc:0x007f9e09048090@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/backtrace_cleaner.rb:12>, #<Proc:0x007f9e09043450@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/backtrace_cleaner.rb:24>], @silencers=[#<Proc:0x007f9e09043400@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/backtrace_cleaner.rb:15>]>, "action_dispatch.key_generator"=>#<ActiveSupport::CachingKeyGenerator:0x007f9e09043220 @key_generator=#<ActiveSupport::KeyGenerator:0x007f9e09043248 @secret="94bacb757cb090cba6681745bdf0b277d02b62765f5a593cf267c51ec4d2c138c51a1c414fa82a1d8b5429db29926ec56bcacbab6c2e1e74492c8c0274b65077", @iterations=1000>, @cache_keys=#<ThreadSafe::Cache:0x007f9e090431f8 @backend={"encrypted cookie64"=>"\xF5\xA6\xEE41\e\xF8\x84y\xA9\xE1\xCF\r\xF9\xC8\xFA\x9EE\xEA\xF1(\x89\xD9\xDAs\xD4\xB2\xAB\xBB\xAE\x02\xD3j=\xA7\x8D\xC1'Qg\xC6\x8Bb\f\xEB\x9DJ\xE0\xCB$Pm\x94$K+\xCF\xD8\x10\xFA\x8BB\x9E\xBB", "signed encrypted cookie64"=>"\xEC3tG\xC7qo\xA3F3=n\xBB\xC9\xAF\xA7LfyQ\xFF\xF1\xE0-\xEEz\xE1\x18\x7F'x\xC3\x15]\xD5\x00\x8Aq{\xE1\x92\a\xEE\xCAqk/\x03\xF48VJh\xF2W\x85\xDD?\xF3\x16\x1F\xE7\xF9\x92"}, @default_proc=nil>>, "action_dispatch.http_auth_salt"=>"http authentication", "action_dispatch.signed_cookie_salt"=>"signed cookie", "action_dispatch.encrypted_cookie_salt"=>"encrypted cookie", "action_dispatch.encrypted_signed_cookie_salt"=>"signed encrypted cookie", "action_dispatch.cookies_serializer"=>nil, "ROUTES_70158323201100_SCRIPT_NAME"=>"", "action_dispatch.request_id"=>"d3f2218e-ec09-44b6-9cd2-f34f566bd38a", "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::GetIp:0x007f9e0704ee88 @env={...}, @check_ip=true, @proxies=/
332
+ ^127\.0\.0\.1$ | # localhost IPv4
333
+ ^::1$ | # localhost IPv6
334
+ ^fc00: | # private IPv6 range fc00
335
+ ^10\. | # private IPv4 range 10.x.x.x
336
+ ^172\.(1[6-9]|2[0-9]|3[0-1])\.| # private IPv4 range 172.16.0.0 .. 172.31.255.255
337
+ ^192\.168\. # private IPv4 range 192.168.x.x
338
+ /x>, "rack.session"=>#<ActionDispatch::Request::Session:0x7f9e04fb3e08 not yet loaded>, "rack.session.options"=>#<ActionDispatch::Request::Session::Options:0x007f9e04fb3db8 @by=#<ActionDispatch::Session::CookieStore:0x007f9e042e8200 @app=#<ActionDispatch::Flash:0x007f9e042e82a0 @app=#<ActionDispatch::ParamsParser:0x007f9e042e84f8 @app=#<Rack::Head:0x007f9e042e8818 @app=#<Rack::ConditionalGet:0x007f9e042e88b8 @app=#<Rack::ETag:0x007f9e042e88e0 @app=#<ActionDispatch::Routing::RouteSet:0x007f9e03dd6898>, @cache_control="max-age=0, private, must-revalidate", @no_cache_control="no-cache">>>, @parsers={#<Mime::Type:0x007f9e038890e8 @synonyms=["text/x-json", "application/jsonrequest"], @symbol=:json, @string="application/json">=>:json}>>, @default_options={:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false}, @key="_dummy_session", @cookie_only=true>, @env={...}, @delegate={:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false}>, "action_dispatch.request.path_parameters"=>{:action=>"simple", :controller=>"pages", :locale=>"es"}, "action_controller.instance"=>#<PagesController:0x007f9e0938fc30 @_action_has_layout=true, @_routes=nil, @_headers={"Content-Type"=>"text/html"}, @_status=200, @_request=#<ActionDispatch::Request:0x007f9e0938fb68 ...>, @_response=#<ActionDispatch::Response:0x007f9e0938fb40 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x007f9e0938faa0>, @stream=#<ActionDispatch::Response::Buffer:0x007f9e0938fa00 @response=#<ActionDispatch::Response:0x007f9e0938fb40 ...>, @buf=[], @closed=false>, @header={"X-Frame-Options"=>"SAMEORIGIN", "X-XSS-Protection"=>"1; mode=block", "X-Content-Type-Options"=>"nosniff"}, @status=200, @sending_file=false, @blank=false, @cv=#<MonitorMixin::ConditionVariable:0x007f9e0938f9d8 @monitor=#<ActionDispatch::Response:0x007f9e0938fb40 ...>, @cond=#<Thread::ConditionVariable:0x007f9e0938f9b0>>, @committed=false, @sending=false, @sent=false, @content_type=nil, @charset=nil, @cache_control={}, @etag=nil, @request=#<ActionDispatch::Request:0x007f9e0938fb68 ...>>, @_env={...}, @_prefixes=["pages", "application"], @_lookup_context=#<ActionView::LookupContext:0x007f9e0938f780 @details_key=nil, @details={:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby]}, @skip_default_locale=false, @cache=true, @prefixes=["pages", "application"], @rendered_format=nil, @view_paths=#<ActionView::PathSet:0x007f9e0938f708 @paths=[#<ActionView::OptimizedFileSystemResolver:0x007f9e04ce2878 @pattern=":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:handlers,}", @cache=#<ActionView::Resolver::Cache:0x007f9e04ce2850 @data=#<ActionView::Resolver::Cache::SmallCache:0x007f9e04ce2828 @backend={#<ActionView::LookupContext::DetailsKey:0x007f9e04682c58 @hash=-4552158567482680770>=>#<ActionView::Resolver::Cache::SmallCache:0x007f9e0467a788 @backend={"simple"=>#<ActionView::Resolver::Cache::SmallCache:0x007f9e0467a698 @backend={"pages"=>#<ActionView::Resolver::Cache::SmallCache:0x007f9e0467a558 @backend={false=>#<ActionView::Resolver::Cache::SmallCache:0x007f9e0467a3a0 @backend={}, @default_proc=nil>}, @default_proc=#<Proc:0x007f9e049b98e0@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionview-4.1.1/lib/action_view/template/resolver.rb:45 (lambda)>>, "application"=>#<ActionView::Resolver::Cache::SmallCache:0x007f9e04679428 @backend={false=>#<ActionView::Resolver::Cache::SmallCache:0x007f9e046791d0 @backend={}, @default_proc=nil>}, @default_proc=#<Proc:0x007f9e049b98e0@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionview-4.1.1/lib/action_view/template/resolver.rb:45 (lambda)>>}, @default_proc=#<Proc:0x007f9e049b98b8@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionview-4.1.1/lib/action_view/template/resolver.rb:46 (lambda)>>}, @default_proc=#<Proc:0x007f9e049b9868@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionview-4.1.1/lib/action_view/template/resolver.rb:47 (lambda)>>}, @default_proc=#<Proc:0x007f9e049b9840@/Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionview-4.1.1/lib/action_view/template/resolver.rb:48 (lambda)>>>, @path="/Users/Matt/Documents/Museways/Herramientas/Rails/translatable_routes/test/dummy/app/views">]>>, @_action_name="simple", @_response_body=nil, @marked_for_same_origin_verification=true, @_config={}, @_url_options={:host=>"localhost", :port=>3000, :protocol=>"http://", :_recall=>{:action=>"simple", :controller=>"pages", :locale=>"es"}, :locale=>#<ActionDispatch::Request:0x007f9e0938fb68 ...>}>, "action_dispatch.request.content_type"=>nil, "action_dispatch.request.request_parameters"=>{}, "rack.request.query_string"=>"", "rack.request.query_hash"=>{}, "action_dispatch.request.query_parameters"=>{}, "action_dispatch.request.parameters"=>{"action"=>"simple", "controller"=>"pages", "locale"=>"es"}, "action_dispatch.request.formats"=>[#<Mime::Type:0x007f9e038a0450 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html">]}, @symbolized_path_params={:action=>"simple", :controller=>"pages", :locale=>"es"}, @filtered_parameters={"action"=>"simple", "controller"=>"pages", "locale"=>"es"}, @filtered_env=nil, @filtered_path=nil, @protocol="http://", @port=3000, @method="GET", @request_method="GET", @remote_ip=nil, @original_fullpath=nil, @fullpath="/es/simple", @ip=nil, @uuid=nil>} missing required keys: [:locale]):
339
+ app/controllers/pages_controller.rb:4:in `simple'
340
+
341
+
342
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.6ms)
343
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.2ms)
344
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.7ms)
345
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (15.3ms)
346
+
347
+
348
+ Started GET "/es/simple" for 127.0.0.1 at 2014-05-18 18:54:39 -0300
349
+ Processing by PagesController#simple as HTML
350
+ Parameters: {"locale"=>"es"}
351
+ Completed 500 Internal Server Error in 0ms
352
+
353
+ ActionController::UrlGenerationError (No route matches {:action=>"simple", :controller=>"pages", :locale=>nil} missing required keys: [:locale]):
354
+ app/controllers/pages_controller.rb:4:in `simple'
355
+
356
+
357
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.7ms)
358
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.2ms)
359
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
360
+ Rendered /Users/Matt/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (12.9ms)