{"action":"created","issue":{"url":"https://api.github.com/repos/sferik/rails_admin/issues/2107","labels_url":"https://api.github.com/repos/sferik/rails_admin/issues/2107/labels{/name}","comments_url":"https://api.github.com/repos/sferik/rails_admin/issues/2107/comments","events_url":"https://api.github.com/repos/sferik/rails_admin/issues/2107/events","html_url":"https://github.com/sferik/rails_admin/issues/2107","id":48647244,"number":2107,"title":"error while updating user","user":{"login":"xxxazxxx","id":311955,"avatar_url":"https://avatars.githubusercontent.com/u/311955?v=3","gravatar_id":"","url":"https://api.github.com/users/xxxazxxx","html_url":"https://github.com/xxxazxxx","followers_url":"https://api.github.com/users/xxxazxxx/followers","following_url":"https://api.github.com/users/xxxazxxx/following{/other_user}","gists_url":"https://api.github.com/users/xxxazxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/xxxazxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xxxazxxx/subscriptions","organizations_url":"https://api.github.com/users/xxxazxxx/orgs","repos_url":"https://api.github.com/users/xxxazxxx/repos","events_url":"https://api.github.com/users/xxxazxxx/events{/privacy}","received_events_url":"https://api.github.com/users/xxxazxxx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-13T15:18:30Z","updated_at":"2015-01-22T17:46:04Z","closed_at":null,"body":"rails_admin user editing :\r\n````\r\nActiveRecord::RecordNotUnique in RailsAdmin::MainController#edit\r\nPG::UniqueViolation: ERROR: duplicate key value violates unique constraint \"users_pkey\" DETAIL: Key (id)=(1) already exists. : UPDATE \"users\" SET \"current_sign_in_at\" = $1, \"first_name\" = $2, \"id\" = $3, \"is_admin\" = $4, \"last_sign_in_at\" = $5, \"unconfirmed_email\" = $6, \"updated_at\" = $7 WHERE \"users\".\"id\" = 3\r\n\r\nExtracted source (around line #74):\r\n72\r\n73\r\n74\r\n75\r\n76\r\n77\r\n          \r\n    old_time_zone = Time.zone\r\n    Time.zone = current_user.time_zone if user_signed_in?\r\n    yield\r\n  ensure\r\n    Time.zone = old_time_zone\r\n  end\r\n\r\nRails.root: /home/admin/ror/aurum\r\n\r\nApplication Trace | Framework Trace | Full Trace\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:834:in `get_last_result'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:834:in `block in exec_cache'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `exec_cache'\r\nvendor/bundle/ruby/2.1.0/gems/schema_plus-1.6.0/lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb:237:in `exec_cache_with_schema_plus'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `exec_delete'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:101:in `update'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/relation.rb:84:in `_update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/persistence.rb:494:in `_update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/locking/optimistic.rb:70:in `_update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/attribute_methods/dirty.rb:83:in `_update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/callbacks.rb:310:in `block in _update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:113:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:113:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:86:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:86:in `run_callbacks'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/callbacks.rb:310:in `_update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/timestamp.rb:70:in `_update_record'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/persistence.rb:483:in `create_or_update'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/callbacks.rb:302:in `block in create_or_update'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:113:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:113:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:86:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:86:in `run_callbacks'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/callbacks.rb:302:in `create_or_update'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/persistence.rb:103:in `save'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/validations.rb:51:in `save'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/attribute_methods/dirty.rb:21:in `save'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:268:in `block (2 levels) in save'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:208:in `transaction'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:268:in `block in save'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:283:in `rollback_active_record_state!'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/transactions.rb:267:in `save'\r\nvendor/bundle/ruby/2.1.0/gems/rails_admin-0.6.5/lib/rails_admin/adapters/active_record/abstract_object.rb:23:in `save'\r\nvendor/bundle/ruby/2.1.0/gems/rails_admin-0.6.5/lib/rails_admin/config/actions/edit.rb:33:in `block (2 levels) in <class:Edit>'\r\n(eval):8:in `instance_eval'\r\n(eval):8:in `edit'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/abstract_controller/base.rb:189:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/rendering.rb:10:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:113:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:113:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:299:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'\r\napp/controllers/application_controller.rb:74:in `set_time_zone'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:424:in `block in make_lambda'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:298:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:298:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:229:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:229:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:229:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:229:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:229:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:229:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:166:in `block in halting'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:86:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:86:in `run_callbacks'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/abstract_controller/callbacks.rb:19:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/rescue.rb:29:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications.rb:159:in `block in instrument'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications.rb:159:in `instrument'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/abstract_controller/base.rb:136:in `process'\r\nvendor/bundle/ruby/2.1.0/gems/actionview-4.1.6/lib/action_view/rendering.rb:30:in `process'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal.rb:196:in `dispatch'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_controller/metal.rb:232:in `block in action'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:82:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:50:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/journey/router.rb:73:in `block in call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/journey/router.rb:59:in `each'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/journey/router.rb:59:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:678:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/engine.rb:514:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/railtie.rb:194:in `public_send'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/railtie.rb:194:in `method_missing'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/journey/router.rb:73:in `block in call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/journey/router.rb:59:in `each'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/journey/router.rb:59:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:678:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-pjax-0.8.0/lib/rack/pjax.rb:12:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'\r\nvendor/bundle/ruby/2.1.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'\r\nvendor/bundle/ruby/2.1.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/omniauth-1.2.2/lib/omniauth/builder.rb:59:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/rack/error_collector.rb:50:in `traced_call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:55:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/rack/agent_hooks.rb:26:in `traced_call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:55:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/rack/browser_monitoring.rb:23:in `traced_call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:55:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'\r\nvendor/bundle/ruby/2.1.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'\r\nvendor/bundle/ruby/2.1.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:35:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/params_parser.rb:27:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/flash.rb:254:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/cookies.rb:560:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/query_cache.rb:36:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/migration.rb:380:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:82:in `run_callbacks'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/reloader.rb:73:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/airbrake-4.1.0/lib/airbrake/rails/middleware.rb:13:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/rack/logger.rb:38:in `call_app'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/rack/logger.rb:22:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/quiet_assets-1.0.3/lib/quiet_assets.rb:23:in `call_with_quiet_assets'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/static.rb:64:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/airbrake-4.1.0/lib/airbrake/user_informer.rb:16:in `_call'\r\nvendor/bundle/ruby/2.1.0/gems/airbrake-4.1.0/lib/airbrake/user_informer.rb:12:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/engine.rb:514:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:144:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.5.251/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'\r\nvendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'\r\n/home/admin/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'\r\n/home/admin/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'\r\n/home/admin/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'\r\nRequest\r\n\r\nParameters:\r\n\r\n{\"utf8\"=>\"✓\",\r\n \"_method\"=>\"put\",\r\n \"authenticity_token\"=>\"F7qy0iFONT97Nq+X3EEVYuXKBInkfyi+WEtFTQtozOI=\",\r\n \"user\"=>{\"first_name\"=>\"aditya\",\r\n \"last_name\"=>\"9892364777\",\r\n \"remove_image_url\"=>\"0\",\r\n \"image_url_cache\"=>\"\",\r\n \"email\"=>\"9892364777@ivmm.oro.in\",\r\n \"password\"=>\"[FILTERED]\",\r\n \"password_confirmation\"=>\"[FILTERED]\",\r\n \"reset_password_sent_at\"=>\"[FILTERED]\",\r\n \"remember_created_at\"=>\"\",\r\n \"sign_in_count\"=>\"1\",\r\n \"current_sign_in_at\"=>\"November 01,\r\n 2014 15:33\",\r\n \"last_sign_in_at\"=>\"November 01,\r\n 2014 15:33\",\r\n \"current_sign_in_ip\"=>\"127.0.0.1\",\r\n \"last_sign_in_ip\"=>\"127.0.0.1\",\r\n \"confirmed_at\"=>\"\",\r\n \"confirmation_sent_at\"=>\"\",\r\n \"unconfirmed_email\"=>\"\",\r\n \"failed_attempts\"=>\"0\",\r\n \"locked_at\"=>\"\",\r\n \"is_admin\"=>\"0\",\r\n \"time_zone\"=>\"Mumbai\",\r\n \"username\"=>\"9892364777\",\r\n \"role_ids\"=>[\"\",\r\n \"\"]},\r\n \"return_to\"=>\"http://localhost:3000/admin/user\",\r\n \"_save\"=>\"\",\r\n \"model_name\"=>\"user\",\r\n \"id\"=>\"3\"}\r\n\r\n````"},"comment":{"url":"https://api.github.com/repos/sferik/rails_admin/issues/comments/71063847","html_url":"https://github.com/sferik/rails_admin/issues/2107#issuecomment-71063847","issue_url":"https://api.github.com/repos/sferik/rails_admin/issues/2107","id":71063847,"user":{"login":"mdkirby","id":1305439,"avatar_url":"https://avatars.githubusercontent.com/u/1305439?v=3","gravatar_id":"","url":"https://api.github.com/users/mdkirby","html_url":"https://github.com/mdkirby","followers_url":"https://api.github.com/users/mdkirby/followers","following_url":"https://api.github.com/users/mdkirby/following{/other_user}","gists_url":"https://api.github.com/users/mdkirby/gists{/gist_id}","starred_url":"https://api.github.com/users/mdkirby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdkirby/subscriptions","organizations_url":"https://api.github.com/users/mdkirby/orgs","repos_url":"https://api.github.com/users/mdkirby/repos","events_url":"https://api.github.com/users/mdkirby/events{/privacy}","received_events_url":"https://api.github.com/users/mdkirby/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T17:46:04Z","updated_at":"2015-01-22T17:46:04Z","body":"I think somewhere, nil.id is being called, which returns 4. I can update the user with the id 4, but I get errors for any other users.\r\n\r\nSuccess for User #4\r\n```\r\nStarted PUT \"/admin/user/4/edit\" for [FILTERED] at 2015-01-22 17:25:30 +0000\r\nProcessing by RailsAdmin::MainController#edit as HTML\r\n  Parameters: {\r\n    \"utf8\"=>\"✓\", \r\n    \"authenticity_token\"=>\"[FILTERED]\", \r\n    \"user\"=>{\"first_name\"=>\"[FILTERED]\", \"last_name\"=>\"[FILTERED]\", \"image_url\"=>\"\", \"email\"=>\"[FILTERED]\", \"password\"=>\"[FILTERED]\", \"password_confirmation\"=>\"[FILTERED]\", \"reset_password_sent_at\"=>\"[FILTERED]\", \"remember_created_at\"=>\"January 22, 2015 16:49\", \"sign_in_count\"=>\"2\", \"current_sign_in_at\"=>\"January 22, 2015 16:49\", \"last_sign_in_at\"=>\"January 22, 2015 16:17\", \"current_sign_in_ip\"=>\"[FILTERED]\", \"last_sign_in_ip\"=>\"[FILTERED]\", \"confirmation_token\"=>\"\", \"confirmed_at\"=>\"\", \"confirmation_sent_at\"=>\"\", \"unconfirmed_email\"=>\"\", \"failed_attempts\"=>\"0\", \"unlock_token\"=>\"\", \"locked_at\"=>\"\", \"is_admin\"=>\"1\", \"authentication_ids\"=>[\"\", \"\"]}, \r\n    \"return_to\"=>\"[FILTERED]\", \r\n    \"_save\"=>\"\", \r\n    \"model_name\"=>\"user\", \r\n    \"id\"=>\"4\"}\r\nRedirected to [FILTERED]\r\nCompleted 302 Found in 40ms (ActiveRecord: 7.4ms)\r\n```\r\nNotice the **\"id\"=>\"4\"**\r\n\r\nFailure for User #6\r\n```\r\nStarted PUT \"/admin/user/6/edit\" for [FILTERED] at 2015-01-22 17:39:19 +0000\r\nProcessing by RailsAdmin::MainController#edit as HTML\r\n  Parameters: {\r\n    \"utf8\"=>\"✓\", \r\n    \"authenticity_token\"=>\"[FILTERED]\", \r\n    \"user\"=>{\"first_name\"=>\"[FILTERED]\", \"last_name\"=>\"\", \"image_url\"=>\"\", \"email\"=>\"[FILTERED]\", \"password\"=>\"[FILTERED]\", \"password_confirmation\"=>\"[FILTERED]\", \"reset_password_sent_at\"=>\"[FILTERED]\", \"remember_created_at\"=>\"\", \"sign_in_count\"=>\"1\", \"current_sign_in_at\"=>\"January 22, 2015 16:49\", \"last_sign_in_at\"=>\"January 22, 2015 16:49\", \"current_sign_in_ip\"=>\"[FILTERED]\", \"last_sign_in_ip\"=>\"[FILTERED]\", \"confirmation_token\"=>\"\", \"confirmed_at\"=>\"\", \"confirmation_sent_at\"=>\"\", \"unconfirmed_email\"=>\"\", \"failed_attempts\"=>\"0\", \"unlock_token\"=>\"\", \"locked_at\"=>\"\", \"is_admin\"=>\"1\", \"authentication_ids\"=>[\"\", \"\"]}, \r\n    \"return_to\"=>\"[FILTERED]/admin/user/6\", \"_save\"=>\"\", \r\n    \"model_name\"=>\"user\", \r\n    \"id\"=>\"6\"}\r\nPG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"users_pkey\"\r\nDETAIL:  Key (id)=(4) already exists.\r\n: UPDATE \"users\" SET \"first_name\" = $1, \"last_name\" = $2, \"image_url\" = $3, \"confirmation_token\" = $4, \"unconfirmed_email\" = $5, \"unlock_token\" = $6, \"current_sign_in_at\" = $7, \"last_sign_in_at\" = $8, \"id\" = $9, \"updated_at\" = $10 WHERE \"users\".\"id\" = $11\r\nCompleted 500 Internal Server Error in 1033ms\r\n\r\nActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"users_pkey\"\r\nDETAIL:  Key (id)=(4) already exists.\r\n: UPDATE \"users\" SET \"first_name\" = $1, \"last_name\" = $2, \"image_url\" = $3, \"confirmation_token\" = $4, \"unconfirmed_email\" = $5, \"unlock_token\" = $6, \"current_sign_in_at\" = $7, \"last_sign_in_at\" = $8, \"id\" = $9, \"updated_at\" = $10 WHERE \"users\".\"id\" = $11):\r\n```\r\n\r\n"}}