Created
June 6, 2017 23:01
-
-
Save jmercedes/9ff9d8f8c7bbcd6eb5430702138c287c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppProxyController < ApplicationController | |
def by_product | |
#render layout: false, content_type: 'application/json' | |
@product = Course.find_by(product_id: params[:product_id]) | |
respond_to do |format| | |
format.json #{ render json: @product } | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `each' | |
2017-06-06T22:15:28.753084+00:00 app[web.1]: ActionController::RoutingError (uninitialized constant AppProxy): | |
2017-06-06T22:15:28.753091+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:60:in `controller' | |
2017-06-06T22:15:28.753090+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:70:in `controller_reference' | |
2017-06-06T22:15:28.753091+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:39:in `serve' | |
2017-06-06T22:15:28.753086+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `const_get' | |
2017-06-06T22:15:28.753092+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:43:in `block in serve' | |
2017-06-06T22:15:28.753089+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `constantize' | |
2017-06-06T22:15:28.753089+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `inject' | |
2017-06-06T22:15:28.753092+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `each' | |
2017-06-06T22:15:28.753096+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.2/lib/omniauth/strategy.rb:164:in `call' | |
2017-06-06T22:15:28.753093+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `serve' | |
2017-06-06T22:15:28.753095+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.2/lib/omniauth/strategy.rb:186:in `call!' | |
2017-06-06T22:15:28.753094+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:817:in `call' | |
2017-06-06T22:15:28.753097+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/etag.rb:24:in `call' | |
2017-06-06T22:15:28.753096+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.2/lib/omniauth/builder.rb:63:in `call' | |
2017-06-06T22:15:28.753099+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/flash.rb:260:in `call' | |
2017-06-06T22:15:28.753097+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/conditionalget.rb:25:in `call' | |
2017-06-06T22:15:28.753098+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/params_parser.rb:27:in `call' | |
2017-06-06T22:15:28.753099+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/session/abstract/id.rb:225:in `context' | |
2017-06-06T22:15:28.753098+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/head.rb:13:in `call' | |
2017-06-06T22:15:28.753087+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `block in constantize' | |
2017-06-06T22:15:28.753101+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call' | |
2017-06-06T22:15:28.753100+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/cookies.rb:560:in `call' | |
2017-06-06T22:15:28.753100+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/session/abstract/id.rb:220:in `call' | |
2017-06-06T22:15:28.753100+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/query_cache.rb:36:in `call' | |
2017-06-06T22:15:28.753105+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:38:in `call_app' | |
2017-06-06T22:15:28.753104+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' | |
2017-06-06T22:15:28.753103+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call' | |
2017-06-06T22:15:28.753102+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:88:in `__run_callbacks__' | |
2017-06-06T22:15:28.753102+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' | |
2017-06-06T22:15:28.753103+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks' | |
2017-06-06T22:15:28.753103+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_call_callbacks' | |
2017-06-06T22:15:28.753105+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `block in call' | |
2017-06-06T22:15:28.753106+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `block in tagged' | |
2017-06-06T22:15:28.753106+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:26:in `tagged' | |
2017-06-06T22:15:28.753106+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `tagged' | |
2017-06-06T22:15:28.753107+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `call' | |
2017-06-06T22:15:28.753104+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' | |
2017-06-06T22:15:28.753111+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in `call' | |
2017-06-06T22:15:28.753104+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/remote_ip.rb:78:in `call' | |
2017-06-06T22:15:28.753112+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' | |
2017-06-06T22:15:28.753113+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:120:in `call' | |
2017-06-06T22:15:28.753111+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call' | |
2017-06-06T22:15:28.753114+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:518:in `call' | |
2017-06-06T22:15:28.753113+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/sendfile.rb:113:in `call' | |
2017-06-06T22:15:28.753114+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:165:in `call' | |
2017-06-06T22:15:28.753112+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/runtime.rb:18:in `call' | |
2017-06-06T22:15:28.753114+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/configuration.rb:224:in `call' | |
2017-06-06T22:15:28.753115+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/server.rb:600:in `handle_request' | |
2017-06-06T22:15:28.753115+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/server.rb:435:in `process_client' | |
2017-06-06T22:15:28.753116+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/server.rb:299:in `block in run' | |
2017-06-06T22:15:28.753116+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/thread_pool.rb:120:in `block in spawn_thread' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
app_proxy GET /app_proxy/products/by_product/:product_id(.:format) app_proxy/products#by_product | |
root GET | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :app_proxy do | |
root action: 'index' | |
get 'products/by_product/:product_id', to: 'products#by_product' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment