Created
May 20, 2015 20:47
-
-
Save dpmccabe/39aa96034b599fee81f8 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
| ArgumentError at /api/v1/products/components_and_accessories | |
| ============================================================ | |
| > When assigning attributes, you must pass a hash as an argument. | |
| app/controllers/api/v1/products_controller.rb, line 7 | |
| ----------------------------------------------------- | |
| ``` ruby | |
| 2 before_filter :verify_auth_token | |
| 3 | |
| 4 respond_to :json | |
| 5 | |
| 6 def components_and_accessories | |
| > 7 render json: Spree::Product.components_and_accessories_plus, root: false | |
| 8 end | |
| 9 | |
| 10 def monitoring_plans | |
| 11 render json: Spree::Product.monitoring_plans_plus, root: false | |
| 12 end | |
| ``` | |
| App backtrace | |
| ------------- | |
| - app/controllers/api/v1/products_controller.rb:7:in `components_and_accessories' | |
| Full backtrace | |
| -------------- | |
| - activerecord (4.1.5) lib/active_record/attribute_assignment.rb:16:in `assign_attributes' | |
| - activerecord (4.1.5) lib/active_record/core.rb:455:in `init_attributes' | |
| - activerecord (4.1.5) lib/active_record/core.rb:198:in `initialize' | |
| - activerecord (4.1.5) lib/active_record/inheritance.rb:30:in `new' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/array_serializer.rb:16:in `block in initialize' | |
| - activerecord (4.1.5) lib/active_record/relation/delegation.rb:46:in `map' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/array_serializer.rb:11:in `initialize' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer.rb:203:in `block in each_association' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer.rb:196:in `each_association' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/adapter/json.rb:11:in `block in serializable_hash' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/adapter.rb:64:in `cached_object' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/adapter/json.rb:9:in `serializable_hash' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/adapter/json.rb:7:in `block in serializable_hash' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/array_serializer.rb:5:in `each' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/adapter/json.rb:7:in `serializable_hash' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/active_model/serializer/adapter.rb:21:in `as_json' | |
| - activesupport (4.1.5) lib/active_support/json/encoding.rb:34:in `encode' | |
| - activesupport (4.1.5) lib/active_support/json/encoding.rb:21:in `encode' | |
| - activesupport (4.1.5) lib/active_support/core_ext/object/json.rb:37:in `to_json_with_active_support_encoder' | |
| - actionpack (4.1.5) lib/action_controller/metal/renderers.rb:96:in `block in | |
| <module:Renderers>' | |
| - () Users/devin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_model_serializers-5da139052c84/lib/action_controller/serialization.rb:49:in `block (2 levels) in | |
| <module:Serialization>' | |
| - actionpack (4.1.5) lib/action_controller/metal/renderers.rb:39:in `block in _handle_render_options' | |
| - /Users/devin/.rbenv/versions/2.2.0/lib/ruby/2.2.0/set.rb:283:in `each' | |
| - actionpack (4.1.5) lib/action_controller/metal/renderers.rb:36:in `_handle_render_options' | |
| - actionpack (4.1.5) lib/action_controller/metal/renderers.rb:32:in `render_to_body' | |
| - actionpack (4.1.5) lib/abstract_controller/rendering.rb:25:in `render' | |
| - actionpack (4.1.5) lib/action_controller/metal/rendering.rb:16:in `render' | |
| - actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render' | |
| - activesupport (4.1.5) lib/active_support/core_ext/benchmark.rb:12:in `block in ms' | |
| - /Users/devin/.rbenv/versions/2.2.0/lib/ruby/2.2.0/benchmark.rb:303:in `realtime' | |
| - activesupport (4.1.5) lib/active_support/core_ext/benchmark.rb:12:in `ms' | |
| - actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:41:in `block in render' | |
| - actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime' | |
| - activerecord (4.1.5) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime' | |
| - actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:40:in `render' | |
| - app/controllers/api/v1/products_controller.rb:7:in `components_and_accessories' | |
| - actionpack (4.1.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action' | |
| - actionpack (4.1.5) lib/abstract_controller/base.rb:189:in `process_action' | |
| - actionpack (4.1.5) lib/action_controller/metal/rendering.rb:10:in `process_action' | |
| - actionpack (4.1.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:113:in `call' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:229:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:229:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:86:in `run_callbacks' | |
| - actionpack (4.1.5) lib/abstract_controller/callbacks.rb:19:in `process_action' | |
| - actionpack (4.1.5) lib/action_controller/metal/rescue.rb:29:in `process_action' | |
| - actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action' | |
| - activesupport (4.1.5) lib/active_support/notifications.rb:159:in `block in instrument' | |
| - activesupport (4.1.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
| - activesupport (4.1.5) lib/active_support/notifications.rb:159:in `instrument' | |
| - actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action' | |
| - actionpack (4.1.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action' | |
| - activerecord (4.1.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action' | |
| - actionpack (4.1.5) lib/abstract_controller/base.rb:136:in `process' | |
| - actionview (4.1.5) lib/action_view/rendering.rb:30:in `process' | |
| - actionpack (4.1.5) lib/action_controller/metal.rb:196:in `dispatch' | |
| - actionpack (4.1.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' | |
| - actionpack (4.1.5) lib/action_controller/metal.rb:232:in `block in action' | |
| - actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:82:in `dispatch' | |
| - actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:50:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/journey/router.rb:71:in `block in call' | |
| - actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:678:in `call' | |
| - meta_request (0.3.4) lib/meta_request/middlewares/app_request_handler.rb:13:in `call' | |
| - meta_request (0.3.4) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call' | |
| - rack (1.5.3) lib/rack/etag.rb:23:in `call' | |
| - rack (1.5.3) lib/rack/conditionalget.rb:25:in `call' | |
| - rack (1.5.3) lib/rack/head.rb:11:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/flash.rb:254:in `call' | |
| - rack (1.5.3) lib/rack/session/abstract/id.rb:225:in `context' | |
| - rack (1.5.3) lib/rack/session/abstract/id.rb:220:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/cookies.rb:560:in `call' | |
| - activerecord (4.1.5) lib/active_record/query_cache.rb:36:in `call' | |
| - activerecord (4.1.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call' | |
| - activerecord (4.1.5) lib/active_record/migration.rb:380:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' | |
| - activesupport (4.1.5) lib/active_support/callbacks.rb:82:in `run_callbacks' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/reloader.rb:73:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/remote_ip.rb:76:in `call' | |
| - rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call' | |
| - meta_request (0.3.4) lib/meta_request/middlewares/headers.rb:16:in `call' | |
| - better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call' | |
| - better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call' | |
| - better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' | |
| - railties (4.1.5) lib/rails/rack/logger.rb:38:in `call_app' | |
| - railties (4.1.5) lib/rails/rack/logger.rb:22:in `call' | |
| - quiet_assets (1.0.3) lib/quiet_assets.rb:23:in `call_with_quiet_assets' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/request_id.rb:21:in `call' | |
| - rack (1.5.3) lib/rack/methodoverride.rb:21:in `call' | |
| - rack (1.5.3) lib/rack/runtime.rb:17:in `call' | |
| - activesupport (4.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call' | |
| - rack (1.5.3) lib/rack/lock.rb:17:in `call' | |
| - actionpack (4.1.5) lib/action_dispatch/middleware/static.rb:64:in `call' | |
| - rack (1.5.3) lib/rack/sendfile.rb:112:in `call' | |
| - railties (4.1.5) lib/rails/engine.rb:514:in `call' | |
| - railties (4.1.5) lib/rails/application.rb:144:in `call' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:155:in `handle' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:109:in `rescue in block (2 levels) in start' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:106:in `block (2 levels) in start' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:96:in `block in start' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:76:in `start' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `run' | |
| - /Users/devin/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/bin/nack_worker:4:in ` | |
| <main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment