{"action":"created","issue":{"url":"https://api.github.com/repos/AsteriskLabs/devise_google_authenticator/issues/20","labels_url":"https://api.github.com/repos/AsteriskLabs/devise_google_authenticator/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/AsteriskLabs/devise_google_authenticator/issues/20/comments","events_url":"https://api.github.com/repos/AsteriskLabs/devise_google_authenticator/issues/20/events","html_url":"https://github.com/AsteriskLabs/devise_google_authenticator/issues/20","id":30001142,"number":20,"title":"ActiveModel::MassAssignmentSecurity::Error in Devise::DisplayqrController#update","user":{"login":"webhat","id":164971,"avatar_url":"https://avatars.githubusercontent.com/u/164971?v=3","gravatar_id":"","url":"https://api.github.com/users/webhat","html_url":"https://github.com/webhat","followers_url":"https://api.github.com/users/webhat/followers","following_url":"https://api.github.com/users/webhat/following{/other_user}","gists_url":"https://api.github.com/users/webhat/gists{/gist_id}","starred_url":"https://api.github.com/users/webhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webhat/subscriptions","organizations_url":"https://api.github.com/users/webhat/orgs","repos_url":"https://api.github.com/users/webhat/repos","events_url":"https://api.github.com/users/webhat/events{/privacy}","received_events_url":"https://api.github.com/users/webhat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-03-23T23:12:09Z","updated_at":"2015-04-14T14:18:44Z","closed_at":null,"body":"I got the error below, I'm using the current gem from rubygems.org, which is `0.3.8`\r\n\r\nI'm guessing that the following in `displayqr_controller.rb`:\r\n\r\n```\r\n  def resource_params\r\n    return params.require(resource_name.to_sym).permit(:gauth_enabled) if strong_parameters_enabled?\r\n    params\r\n  end\r\n```\r\n\r\nShould actually be:\r\n\r\n```\r\n  def resource_params\r\n    return params.require(resource_name.to_sym).permit(:gauth_enabled) if strong_parameters_enabled?\r\n    params[:user]\r\n  end\r\n```\r\n\r\n---\r\n\r\n    Can't mass-assign protected attributes: utf8, _method, authenticity_token, user, commit, action, controller\r\n\r\n\r\n```\r\nactivemodel (3.2.14) lib/active_model/mass_assignment_security/sanitizer.rb:48:in `process_removed_attributes'\r\nactivemodel (3.2.14) lib/active_model/mass_assignment_security/sanitizer.rb:20:in `debug_protected_attribute_removal'\r\nactivemodel (3.2.14) lib/active_model/mass_assignment_security/sanitizer.rb:12:in `sanitize'\r\nactivemodel (3.2.14) lib/active_model/mass_assignment_security.rb:230:in `sanitize_for_mass_assignment'\r\nactiverecord (3.2.14) lib/active_record/attribute_assignment.rb:75:in `assign_attributes'\r\nactiverecord (3.2.14) lib/active_record/persistence.rb:216:in `block in update_attributes'\r\nactiverecord (3.2.14) lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'\r\nactiverecord (3.2.14) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'\r\nactiverecord (3.2.14) lib/active_record/transactions.rb:208:in `transaction'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/agent/method_tracer.rb:524:in `block in transaction_with_trace_ActiveRecord_self_name_transaction'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/agent/method_tracer.rb:276:in `trace_execution_scoped'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/agent/method_tracer.rb:519:in `transaction_with_trace_ActiveRecord_self_name_transaction'\r\nactiverecord (3.2.14) lib/active_record/transactions.rb:311:in `with_transaction_returning_status'\r\nactiverecord (3.2.14) lib/active_record/persistence.rb:215:in `update_attributes'\r\ndevise (3.2.2) lib/devise/models/database_authenticatable.rb:98:in `update_without_password'\r\ndevise_google_authenticator (0.3.9) lib/devise_google_authenticatable/models/google_authenticatable.rb:23:in `set_gauth_enabled'\r\ndevise_google_authenticator (0.3.9) app/controllers/devise/displayqr_controller.rb:16:in `update'\r\nactionpack (3.2.14) lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\nactionpack (3.2.14) lib/abstract_controller/base.rb:167:in `process_action'\r\nactionpack (3.2.14) lib/action_controller/metal/rendering.rb:10:in `process_action'\r\nactionpack (3.2.14) lib/abstract_controller/callbacks.rb:18:in `block in process_action'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:469:in `_run__1275140421611138688__process_action__2861611677323709685__callbacks'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'\r\nactionpack (3.2.14) lib/abstract_controller/callbacks.rb:17:in `process_action'\r\nactionpack (3.2.14) lib/action_controller/metal/rescue.rb:29:in `process_action'\r\nactionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'\r\nactivesupport (3.2.14) lib/active_support/notifications.rb:123:in `block in instrument'\r\nactivesupport (3.2.14) lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\nactivesupport (3.2.14) lib/active_support/notifications.rb:123:in `instrument'\r\nactionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:29:in `process_action'\r\nactionpack (3.2.14) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'\r\nactiverecord (3.2.14) lib/active_record/railties/controller_runtime.rb:18:in `process_action'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:38:in `block in process_action'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:339:in `perform_action_with_newrelic_trace'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:37:in `process_action'\r\nactionpack (3.2.14) lib/abstract_controller/base.rb:121:in `process'\r\nactionpack (3.2.14) lib/abstract_controller/rendering.rb:45:in `process'\r\nactionpack (3.2.14) lib/action_controller/metal.rb:203:in `dispatch'\r\nactionpack (3.2.14) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'\r\nactionpack (3.2.14) lib/action_controller/metal.rb:246:in `block in action'\r\nactionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:73:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'\r\nactionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:36:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/routing/mapper.rb:43:in `call'\r\njourney (1.0.4) lib/journey/router.rb:68:in `block in call'\r\njourney (1.0.4) lib/journey/router.rb:56:in `each'\r\njourney (1.0.4) lib/journey/router.rb:56:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:608:in `call'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/rack/error_collector.rb:50:in `call'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/rack/agent_hooks.rb:28:in `call'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/rack/browser_monitoring.rb:23:in `call'\r\nnewrelic_rpm (3.7.1.182) lib/new_relic/rack/developer_mode.rb:42:in `call'\r\nrack (1.4.5) lib/rack/deflater.rb:13:in `call'\r\nwarden (1.2.3) lib/warden/manager.rb:35:in `block in call'\r\nwarden (1.2.3) lib/warden/manager.rb:34:in `catch'\r\nwarden (1.2.3) lib/warden/manager.rb:34:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'\r\nrack (1.4.5) lib/rack/etag.rb:23:in `call'\r\nrack (1.4.5) lib/rack/conditionalget.rb:35:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/head.rb:14:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/params_parser.rb:21:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/flash.rb:242:in `call'\r\nrack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'\r\nrack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/cookies.rb:341:in `call'\r\nactiverecord (3.2.14) lib/active_record/query_cache.rb:64:in `call'\r\nactiverecord (3.2.14) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:405:in `_run__882152244716231407__call__2391952966024774611__callbacks'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'\r\nactivesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:27:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/reloader.rb:65:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'\r\nrailties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app'\r\nrailties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call'\r\nactivesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged'\r\nrailties (3.2.14) lib/rails/rack/logger.rb:16:in `call'\r\nquiet_assets (1.0.2) lib/quiet_assets.rb:18:in `call_with_quiet_assets'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call'\r\nrack (1.4.5) lib/rack/methodoverride.rb:21:in `call'\r\nrack (1.4.5) lib/rack/runtime.rb:17:in `call'\r\nactivesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call'\r\nrack (1.4.5) lib/rack/lock.rb:15:in `call'\r\nactionpack (3.2.14) lib/action_dispatch/middleware/static.rb:63:in `call'\r\nrailties (3.2.14) lib/rails/engine.rb:484:in `call'\r\nrailties (3.2.14) lib/rails/application.rb:231:in `call'\r\nrack (1.4.5) lib/rack/content_length.rb:14:in `call'\r\nrailties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call'\r\nthin (1.6.1) lib/thin/connection.rb:82:in `block in pre_process'\r\nthin (1.6.1) lib/thin/connection.rb:80:in `catch'\r\nthin (1.6.1) lib/thin/connection.rb:80:in `pre_process'\r\nthin (1.6.1) lib/thin/connection.rb:55:in `process'\r\nthin (1.6.1) lib/thin/connection.rb:41:in `receive_data'\r\neventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine'\r\neventmachine (1.0.3) lib/eventmachine.rb:187:in `run'\r\nthin (1.6.1) lib/thin/backends/base.rb:73:in `start'\r\nthin (1.6.1) lib/thin/server.rb:162:in `start'\r\nrack (1.4.5) lib/rack/handler/thin.rb:13:in `run'\r\nrack (1.4.5) lib/rack/server.rb:268:in `start'\r\nrailties (3.2.14) lib/rails/commands/server.rb:70:in `start'\r\nrailties (3.2.14) lib/rails/commands.rb:55:in `block in <top (required)>'\r\nrailties (3.2.14) lib/rails/commands.rb:50:in `tap'\r\nrailties (3.2.14) lib/rails/commands.rb:50:in `<top (required)>'\r\nscript/rails:6:in `require'\r\nscript/rails:6:in `<main>'\r\n```\r\n\r\nParameters:\r\n\r\n```\r\n{\"utf8\"=>\"✓\",\r\n \"_method\"=>\"put\",\r\n \"authenticity_token\"=>\"ytxB3kvbwO3FvB7XMAbz1vFm4uSGtkf/ESkKHhTynH8=\",\r\n \"user\"=>{\"gauth_enabled\"=>\"1\"},\r\n \"commit\"=>\"Continue...\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/AsteriskLabs/devise_google_authenticator/issues/comments/92868580","html_url":"https://github.com/AsteriskLabs/devise_google_authenticator/issues/20#issuecomment-92868580","issue_url":"https://api.github.com/repos/AsteriskLabs/devise_google_authenticator/issues/20","id":92868580,"user":{"login":"pabloalr","id":87698,"avatar_url":"https://avatars.githubusercontent.com/u/87698?v=3","gravatar_id":"","url":"https://api.github.com/users/pabloalr","html_url":"https://github.com/pabloalr","followers_url":"https://api.github.com/users/pabloalr/followers","following_url":"https://api.github.com/users/pabloalr/following{/other_user}","gists_url":"https://api.github.com/users/pabloalr/gists{/gist_id}","starred_url":"https://api.github.com/users/pabloalr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pabloalr/subscriptions","organizations_url":"https://api.github.com/users/pabloalr/orgs","repos_url":"https://api.github.com/users/pabloalr/repos","events_url":"https://api.github.com/users/pabloalr/events{/privacy}","received_events_url":"https://api.github.com/users/pabloalr/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T14:18:44Z","updated_at":"2015-04-14T14:18:44Z","body":"Thanks @xntrik ! Problem solved! Sorry for the delay."}}