{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/34432","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/34432/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/34432/comments","events_url":"https://api.github.com/repos/rails/rails/issues/34432/events","html_url":"https://github.com/rails/rails/issues/34432","id":379940547,"node_id":"MDU6SXNzdWUzNzk5NDA1NDc=","number":34432,"title":"url_for: NoMethodError: undefined method `model_name' for #<Array:0x00007fec1c437f28>","user":{"login":"basmoura","id":3411986,"node_id":"MDQ6VXNlcjM0MTE5ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/3411986?v=4","gravatar_id":"","url":"https://api.github.com/users/basmoura","html_url":"https://github.com/basmoura","followers_url":"https://api.github.com/users/basmoura/followers","following_url":"https://api.github.com/users/basmoura/following{/other_user}","gists_url":"https://api.github.com/users/basmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/basmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basmoura/subscriptions","organizations_url":"https://api.github.com/users/basmoura/orgs","repos_url":"https://api.github.com/users/basmoura/repos","events_url":"https://api.github.com/users/basmoura/events{/privacy}","received_events_url":"https://api.github.com/users/basmoura/received_events","type":"User","site_admin":false},"labels":[{"id":1071962662,"node_id":"MDU6TGFiZWwxMDcxOTYyNjYy","url":"https://api.github.com/repos/rails/rails/labels/more-information-needed","name":"more-information-needed","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-12T20:30:02Z","updated_at":"2018-11-12T20:39:42Z","closed_at":null,"author_association":"NONE","body":"Hello, everybody :)\r\n\r\nI'm trying to update my app to Rails 5.2.1 but I'm having some curious error. My application is working without any problem for now if I access http://localhost:3000, but when I run my test suit I'm facing error related to action-pack.\r\n\r\nBasically, all the errors are saying `undefined method `model_name' for #<Array:0x00007fec1c437f28>` for all `url_for`s that I have on my application.\r\n\r\nAs I said, my application runs OK but my test suit doesn't. \r\n\r\n### Expected behavior\r\nSpecs that uses `url_for` works ok.\r\n\r\n### Actual behavior\r\n```\r\n       Failure/Error: get url_for([:edit, scope, customer])\r\n\r\n       NoMethodError:\r\n         undefined method `model_name' for #<Array:0x00007fec07923e48>\r\n       Shared Example Group: \"can edit customer\" called from ./spec/requests/shared/customers_request_spec.rb:166\r\n       # /Users/basmoura/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.1/lib/action_dispatch/routing/polymorphic_routes.rb:171:in `polymorphic_mapping'\r\n       # /Users/basmoura/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.1/lib/action_dispatch/routing/polymorphic_routes.rb:108:in `polymorphic_url'\r\n       # /Users/basmoura/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.1/lib/action_dispatch/routing/url_for.rb:186:in `full_url_for'\r\n       # /Users/basmoura/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.1/lib/action_dispatch/routing/url_for.rb:169:in `url_for'\r\n       # ./spec/requests/shared/customers_request_spec.rb:148:in `block (3 levels) in <top (required)>'\r\n```\r\n\r\n### System configuration\r\n**Rails version**: 5.2.1\r\n**Ruby version**: 2.5.3\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/438021094","html_url":"https://github.com/rails/rails/issues/34432#issuecomment-438021094","issue_url":"https://api.github.com/repos/rails/rails/issues/34432","id":438021094,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODAyMTA5NA==","user":{"login":"rafaelfranca","id":47848,"node_id":"MDQ6VXNlcjQ3ODQ4","avatar_url":"https://avatars3.githubusercontent.com/u/47848?v=4","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T20:39:42Z","updated_at":"2018-11-12T20:39:42Z","author_association":"MEMBER","body":"Also there is any chance your application has a `Array#to_model` method defined?"}}
{"actor":{"display_login":"rafaelfranca"}}