sormiston/HivePro

Unable to Post to appointments - how to create new record?

Closed this issue · 1 comments

Unable to Post to appointments - how to create new record?

Post request agrees with model schema. So why this?

{
"status": 500,
"error": "Internal Server Error",
"exception": "#<ActiveModel::UnknownAttributeError: unknown attribute 'user' for Appointment.>",
"traces": {
"Application Trace": [
{
"exception_object_id": 134400,
"id": 9,
"trace": "app/controllers/appointments_controller.rb:22:in create'" } ], "Framework Trace": [ { "exception_object_id": 134400, "id": 0, "trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:52:in _assign_attribute'"
},
{
"exception_object_id": 134400,
"id": 1,
"trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:43:in block in _assign_attributes'" }, { "exception_object_id": 134400, "id": 2, "trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:42:in each'"
},
{
"exception_object_id": 134400,
"id": 3,
"trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:42:in _assign_attributes'" }, { "exception_object_id": 134400, "id": 4, "trace": "activerecord (6.0.3.3) lib/active_record/attribute_assignment.rb:21:in _assign_attributes'"
},
{
"exception_object_id": 134400,
"id": 5,
"trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:35:in assign_attributes'" }, { "exception_object_id": 134400, "id": 6, "trace": "activerecord (6.0.3.3) lib/active_record/core.rb:325:in initialize'"
},
{
"exception_object_id": 134400,
"id": 7,
"trace": "activerecord (6.0.3.3) lib/active_record/inheritance.rb:70:in new'" }, { "exception_object_id": 134400, "id": 8, "trace": "activerecord (6.0.3.3) lib/active_record/inheritance.rb:70:in new'"
},
{
"exception_object_id": 134400,
"id": 10,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal/basic_implicit_render.rb:6:in send_action'" }, { "exception_object_id": 134400, "id": 11, "trace": "actionpack (6.0.3.3) lib/abstract_controller/base.rb:195:in process_action'"
},
{
"exception_object_id": 134400,
"id": 12,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal/rendering.rb:30:in process_action'" }, { "exception_object_id": 134400, "id": 13, "trace": "actionpack (6.0.3.3) lib/abstract_controller/callbacks.rb:42:in block in process_action'"
},
{
"exception_object_id": 134400,
"id": 14,
"trace": "activesupport (6.0.3.3) lib/active_support/callbacks.rb:135:in run_callbacks'" }, { "exception_object_id": 134400, "id": 15, "trace": "actionpack (6.0.3.3) lib/abstract_controller/callbacks.rb:41:in process_action'"
},
{
"exception_object_id": 134400,
"id": 16,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal/rescue.rb:22:in process_action'" }, { "exception_object_id": 134400, "id": 17, "trace": "actionpack (6.0.3.3) lib/action_controller/metal/instrumentation.rb:33:in block in process_action'"
},
{
"exception_object_id": 134400,
"id": 18,
"trace": "activesupport (6.0.3.3) lib/active_support/notifications.rb:180:in block in instrument'" }, { "exception_object_id": 134400, "id": 19, "trace": "activesupport (6.0.3.3) lib/active_support/notifications/instrumenter.rb:24:in instrument'"
},
{
"exception_object_id": 134400,
"id": 20,
"trace": "activesupport (6.0.3.3) lib/active_support/notifications.rb:180:in instrument'" }, { "exception_object_id": 134400, "id": 21, "trace": "actionpack (6.0.3.3) lib/action_controller/metal/instrumentation.rb:32:in process_action'"
},
{
"exception_object_id": 134400,
"id": 22,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal/params_wrapper.rb:245:in process_action'" }, { "exception_object_id": 134400, "id": 23, "trace": "activerecord (6.0.3.3) lib/active_record/railties/controller_runtime.rb:27:in process_action'"
},
{
"exception_object_id": 134400,
"id": 24,
"trace": "actionpack (6.0.3.3) lib/abstract_controller/base.rb:136:in process'" }, { "exception_object_id": 134400, "id": 25, "trace": "actionpack (6.0.3.3) lib/action_controller/metal.rb:190:in dispatch'"
},
{
"exception_object_id": 134400,
"id": 26,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal.rb:254:in dispatch'" }, { "exception_object_id": 134400, "id": 27, "trace": "actionpack (6.0.3.3) lib/action_dispatch/routing/route_set.rb:50:in dispatch'"
},
{
"exception_object_id": 134400,
"id": 28,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/routing/route_set.rb:33:in serve'" }, { "exception_object_id": 134400, "id": 29, "trace": "actionpack (6.0.3.3) lib/action_dispatch/journey/router.rb:49:in block in serve'"
},
{
"exception_object_id": 134400,
"id": 30,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/journey/router.rb:32:in each'" }, { "exception_object_id": 134400, "id": 31, "trace": "actionpack (6.0.3.3) lib/action_dispatch/journey/router.rb:32:in serve'"
},
{
"exception_object_id": 134400,
"id": 32,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/routing/route_set.rb:834:in call'" }, { "exception_object_id": 134400, "id": 33, "trace": "rack (2.2.3) lib/rack/etag.rb:27:in call'"
},
{
"exception_object_id": 134400,
"id": 34,
"trace": "rack (2.2.3) lib/rack/conditional_get.rb:40:in call'" }, { "exception_object_id": 134400, "id": 35, "trace": "rack (2.2.3) lib/rack/head.rb:12:in call'"
},
{
"exception_object_id": 134400,
"id": 36,
"trace": "activerecord (6.0.3.3) lib/active_record/migration.rb:567:in call'" }, { "exception_object_id": 134400, "id": 37, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/callbacks.rb:27:in block in call'"
},
{
"exception_object_id": 134400,
"id": 38,
"trace": "activesupport (6.0.3.3) lib/active_support/callbacks.rb:101:in run_callbacks'" }, { "exception_object_id": 134400, "id": 39, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/callbacks.rb:26:in call'"
},
{
"exception_object_id": 134400,
"id": 40,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/executor.rb:14:in call'" }, { "exception_object_id": 134400, "id": 41, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in call'"
},
{
"exception_object_id": 134400,
"id": 42,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/debug_exceptions.rb:32:in call'" }, { "exception_object_id": 134400, "id": 43, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in call'"
},
{
"exception_object_id": 134400,
"id": 44,
"trace": "railties (6.0.3.3) lib/rails/rack/logger.rb:37:in call_app'" }, { "exception_object_id": 134400, "id": 45, "trace": "railties (6.0.3.3) lib/rails/rack/logger.rb:26:in block in call'"
},
{
"exception_object_id": 134400,
"id": 46,
"trace": "activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:80:in block in tagged'" }, { "exception_object_id": 134400, "id": 47, "trace": "activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:28:in tagged'"
},
{
"exception_object_id": 134400,
"id": 48,
"trace": "activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:80:in tagged'" }, { "exception_object_id": 134400, "id": 49, "trace": "railties (6.0.3.3) lib/rails/rack/logger.rb:26:in call'"
},
{
"exception_object_id": 134400,
"id": 50,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/remote_ip.rb:81:in call'" }, { "exception_object_id": 134400, "id": 51, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/request_id.rb:27:in call'"
},
{
"exception_object_id": 134400,
"id": 52,
"trace": "rack (2.2.3) lib/rack/runtime.rb:22:in call'" }, { "exception_object_id": 134400, "id": 53, "trace": "activesupport (6.0.3.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call'"
},
{
"exception_object_id": 134400,
"id": 54,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/executor.rb:14:in call'" }, { "exception_object_id": 134400, "id": 55, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/static.rb:126:in call'"
},
{
"exception_object_id": 134400,
"id": 56,
"trace": "rack (2.2.3) lib/rack/sendfile.rb:110:in call'" }, { "exception_object_id": 134400, "id": 57, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/host_authorization.rb:82:in call'"
},
{
"exception_object_id": 134400,
"id": 58,
"trace": "rack-cors (1.1.1) lib/rack/cors.rb:100:in call'" }, { "exception_object_id": 134400, "id": 59, "trace": "railties (6.0.3.3) lib/rails/engine.rb:527:in call'"
},
{
"exception_object_id": 134400,
"id": 60,
"trace": "puma (4.3.6) lib/puma/configuration.rb:228:in call'" }, { "exception_object_id": 134400, "id": 61, "trace": "puma (4.3.6) lib/puma/server.rb:713:in handle_request'"
},
{
"exception_object_id": 134400,
"id": 62,
"trace": "puma (4.3.6) lib/puma/server.rb:472:in process_client'" }, { "exception_object_id": 134400, "id": 63, "trace": "puma (4.3.6) lib/puma/server.rb:328:in block in run'"
},
{
"exception_object_id": 134400,
"id": 64,
"trace": "puma (4.3.6) lib/puma/thread_pool.rb:134:in block in spawn_thread'" } ], "Full Trace": [ { "exception_object_id": 134400, "id": 0, "trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:52:in _assign_attribute'"
},
{
"exception_object_id": 134400,
"id": 1,
"trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:43:in block in _assign_attributes'" }, { "exception_object_id": 134400, "id": 2, "trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:42:in each'"
},
{
"exception_object_id": 134400,
"id": 3,
"trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:42:in _assign_attributes'" }, { "exception_object_id": 134400, "id": 4, "trace": "activerecord (6.0.3.3) lib/active_record/attribute_assignment.rb:21:in _assign_attributes'"
},
{
"exception_object_id": 134400,
"id": 5,
"trace": "activemodel (6.0.3.3) lib/active_model/attribute_assignment.rb:35:in assign_attributes'" }, { "exception_object_id": 134400, "id": 6, "trace": "activerecord (6.0.3.3) lib/active_record/core.rb:325:in initialize'"
},
{
"exception_object_id": 134400,
"id": 7,
"trace": "activerecord (6.0.3.3) lib/active_record/inheritance.rb:70:in new'" }, { "exception_object_id": 134400, "id": 8, "trace": "activerecord (6.0.3.3) lib/active_record/inheritance.rb:70:in new'"
},
{
"exception_object_id": 134400,
"id": 9,
"trace": "app/controllers/appointments_controller.rb:22:in create'" }, { "exception_object_id": 134400, "id": 10, "trace": "actionpack (6.0.3.3) lib/action_controller/metal/basic_implicit_render.rb:6:in send_action'"
},
{
"exception_object_id": 134400,
"id": 11,
"trace": "actionpack (6.0.3.3) lib/abstract_controller/base.rb:195:in process_action'" }, { "exception_object_id": 134400, "id": 12, "trace": "actionpack (6.0.3.3) lib/action_controller/metal/rendering.rb:30:in process_action'"
},
{
"exception_object_id": 134400,
"id": 13,
"trace": "actionpack (6.0.3.3) lib/abstract_controller/callbacks.rb:42:in block in process_action'" }, { "exception_object_id": 134400, "id": 14, "trace": "activesupport (6.0.3.3) lib/active_support/callbacks.rb:135:in run_callbacks'"
},
{
"exception_object_id": 134400,
"id": 15,
"trace": "actionpack (6.0.3.3) lib/abstract_controller/callbacks.rb:41:in process_action'" }, { "exception_object_id": 134400, "id": 16, "trace": "actionpack (6.0.3.3) lib/action_controller/metal/rescue.rb:22:in process_action'"
},
{
"exception_object_id": 134400,
"id": 17,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal/instrumentation.rb:33:in block in process_action'" }, { "exception_object_id": 134400, "id": 18, "trace": "activesupport (6.0.3.3) lib/active_support/notifications.rb:180:in block in instrument'"
},
{
"exception_object_id": 134400,
"id": 19,
"trace": "activesupport (6.0.3.3) lib/active_support/notifications/instrumenter.rb:24:in instrument'" }, { "exception_object_id": 134400, "id": 20, "trace": "activesupport (6.0.3.3) lib/active_support/notifications.rb:180:in instrument'"
},
{
"exception_object_id": 134400,
"id": 21,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal/instrumentation.rb:32:in process_action'" }, { "exception_object_id": 134400, "id": 22, "trace": "actionpack (6.0.3.3) lib/action_controller/metal/params_wrapper.rb:245:in process_action'"
},
{
"exception_object_id": 134400,
"id": 23,
"trace": "activerecord (6.0.3.3) lib/active_record/railties/controller_runtime.rb:27:in process_action'" }, { "exception_object_id": 134400, "id": 24, "trace": "actionpack (6.0.3.3) lib/abstract_controller/base.rb:136:in process'"
},
{
"exception_object_id": 134400,
"id": 25,
"trace": "actionpack (6.0.3.3) lib/action_controller/metal.rb:190:in dispatch'" }, { "exception_object_id": 134400, "id": 26, "trace": "actionpack (6.0.3.3) lib/action_controller/metal.rb:254:in dispatch'"
},
{
"exception_object_id": 134400,
"id": 27,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/routing/route_set.rb:50:in dispatch'" }, { "exception_object_id": 134400, "id": 28, "trace": "actionpack (6.0.3.3) lib/action_dispatch/routing/route_set.rb:33:in serve'"
},
{
"exception_object_id": 134400,
"id": 29,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/journey/router.rb:49:in block in serve'" }, { "exception_object_id": 134400, "id": 30, "trace": "actionpack (6.0.3.3) lib/action_dispatch/journey/router.rb:32:in each'"
},
{
"exception_object_id": 134400,
"id": 31,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/journey/router.rb:32:in serve'" }, { "exception_object_id": 134400, "id": 32, "trace": "actionpack (6.0.3.3) lib/action_dispatch/routing/route_set.rb:834:in call'"
},
{
"exception_object_id": 134400,
"id": 33,
"trace": "rack (2.2.3) lib/rack/etag.rb:27:in call'" }, { "exception_object_id": 134400, "id": 34, "trace": "rack (2.2.3) lib/rack/conditional_get.rb:40:in call'"
},
{
"exception_object_id": 134400,
"id": 35,
"trace": "rack (2.2.3) lib/rack/head.rb:12:in call'" }, { "exception_object_id": 134400, "id": 36, "trace": "activerecord (6.0.3.3) lib/active_record/migration.rb:567:in call'"
},
{
"exception_object_id": 134400,
"id": 37,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/callbacks.rb:27:in block in call'" }, { "exception_object_id": 134400, "id": 38, "trace": "activesupport (6.0.3.3) lib/active_support/callbacks.rb:101:in run_callbacks'"
},
{
"exception_object_id": 134400,
"id": 39,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/callbacks.rb:26:in call'" }, { "exception_object_id": 134400, "id": 40, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/executor.rb:14:in call'"
},
{
"exception_object_id": 134400,
"id": 41,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in call'" }, { "exception_object_id": 134400, "id": 42, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/debug_exceptions.rb:32:in call'"
},
{
"exception_object_id": 134400,
"id": 43,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in call'" }, { "exception_object_id": 134400, "id": 44, "trace": "railties (6.0.3.3) lib/rails/rack/logger.rb:37:in call_app'"
},
{
"exception_object_id": 134400,
"id": 45,
"trace": "railties (6.0.3.3) lib/rails/rack/logger.rb:26:in block in call'" }, { "exception_object_id": 134400, "id": 46, "trace": "activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:80:in block in tagged'"
},
{
"exception_object_id": 134400,
"id": 47,
"trace": "activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:28:in tagged'" }, { "exception_object_id": 134400, "id": 48, "trace": "activesupport (6.0.3.3) lib/active_support/tagged_logging.rb:80:in tagged'"
},
{
"exception_object_id": 134400,
"id": 49,
"trace": "railties (6.0.3.3) lib/rails/rack/logger.rb:26:in call'" }, { "exception_object_id": 134400, "id": 50, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/remote_ip.rb:81:in call'"
},
{
"exception_object_id": 134400,
"id": 51,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/request_id.rb:27:in call'" }, { "exception_object_id": 134400, "id": 52, "trace": "rack (2.2.3) lib/rack/runtime.rb:22:in call'"
},
{
"exception_object_id": 134400,
"id": 53,
"trace": "activesupport (6.0.3.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call'" }, { "exception_object_id": 134400, "id": 54, "trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/executor.rb:14:in call'"
},
{
"exception_object_id": 134400,
"id": 55,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/static.rb:126:in call'" }, { "exception_object_id": 134400, "id": 56, "trace": "rack (2.2.3) lib/rack/sendfile.rb:110:in call'"
},
{
"exception_object_id": 134400,
"id": 57,
"trace": "actionpack (6.0.3.3) lib/action_dispatch/middleware/host_authorization.rb:82:in call'" }, { "exception_object_id": 134400, "id": 58, "trace": "rack-cors (1.1.1) lib/rack/cors.rb:100:in call'"
},
{
"exception_object_id": 134400,
"id": 59,
"trace": "railties (6.0.3.3) lib/rails/engine.rb:527:in call'" }, { "exception_object_id": 134400, "id": 60, "trace": "puma (4.3.6) lib/puma/configuration.rb:228:in call'"
},
{
"exception_object_id": 134400,
"id": 61,
"trace": "puma (4.3.6) lib/puma/server.rb:713:in handle_request'" }, { "exception_object_id": 134400, "id": 62, "trace": "puma (4.3.6) lib/puma/server.rb:472:in process_client'"
},
{
"exception_object_id": 134400,
"id": 63,
"trace": "puma (4.3.6) lib/puma/server.rb:328:in block in run'" }, { "exception_object_id": 134400, "id": 64, "trace": "puma (4.3.6) lib/puma/thread_pool.rb:134:in block in spawn_thread'"
}
]
}
}