{"action":"created","issue":{"url":"https://api.github.com/repos/Hobo/hobo/issues/154","labels_url":"https://api.github.com/repos/Hobo/hobo/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/Hobo/hobo/issues/154/comments","events_url":"https://api.github.com/repos/Hobo/hobo/issues/154/events","html_url":"https://github.com/Hobo/hobo/issues/154","id":86526787,"number":154,"title":" undefined method `macro' for nil:NilClass","user":{"login":"haslinger","id":1116624,"avatar_url":"https://avatars.githubusercontent.com/u/1116624?v=3","gravatar_id":"","url":"https://api.github.com/users/haslinger","html_url":"https://github.com/haslinger","followers_url":"https://api.github.com/users/haslinger/followers","following_url":"https://api.github.com/users/haslinger/following{/other_user}","gists_url":"https://api.github.com/users/haslinger/gists{/gist_id}","starred_url":"https://api.github.com/users/haslinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haslinger/subscriptions","organizations_url":"https://api.github.com/users/haslinger/orgs","repos_url":"https://api.github.com/users/haslinger/repos","events_url":"https://api.github.com/users/haslinger/events{/privacy}","received_events_url":"https://api.github.com/users/haslinger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-09T09:32:01Z","updated_at":"2015-06-09T10:03:12Z","closed_at":"2015-06-09T10:03:12Z","body":"I have a strange issue after deploying, I get the error\r\n```\r\n/home/rails/.rvm/gems/ruby-2.1.5/bundler/gems/hobo-2021b4e8cf3c/hobo/lib/hobo/controller/model.rb:272:in\r\n `auto_actions_for': undefined method `macro' for nil:NilClass (NoMethodError)\r\n```\r\nwhen I try to migrate the database, compile the assets or run the console.\r\nIt results from my  ```auto_actions_for :user, :index``` in the orders_controller, Orders have a belongs_to relation to User, so nothing too fancy.\r\n\r\nSo I looked into the line, which is the second line of the method definition:\r\n``` ruby\r\n      def auto_actions_for(owner, actions)\r\n        name = model.reflections[owner].macro == :has_many ? owner.to_s.singularize : owner\r\n```\r\n\r\nin another system, everything is fine: ```Order.reflections[:user].macro``` returns ```:belongs_to```\r\n\r\nCurrently, I'm mainly thinking, how I can debug this ..."},"comment":{"url":"https://api.github.com/repos/Hobo/hobo/issues/comments/110299786","html_url":"https://github.com/Hobo/hobo/issues/154#issuecomment-110299786","issue_url":"https://api.github.com/repos/Hobo/hobo/issues/154","id":110299786,"user":{"login":"haslinger","id":1116624,"avatar_url":"https://avatars.githubusercontent.com/u/1116624?v=3","gravatar_id":"","url":"https://api.github.com/users/haslinger","html_url":"https://github.com/haslinger","followers_url":"https://api.github.com/users/haslinger/followers","following_url":"https://api.github.com/users/haslinger/following{/other_user}","gists_url":"https://api.github.com/users/haslinger/gists{/gist_id}","starred_url":"https://api.github.com/users/haslinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haslinger/subscriptions","organizations_url":"https://api.github.com/users/haslinger/orgs","repos_url":"https://api.github.com/users/haslinger/repos","events_url":"https://api.github.com/users/haslinger/events{/privacy}","received_events_url":"https://api.github.com/users/haslinger/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T10:03:12Z","updated_at":"2015-06-09T10:03:12Z","body":"Well this was an interesting one. When I commented out, the original error showed up. \r\nI unintentionally imported an extension for the Order model from an Engine, that was not installed - so the import failed. Removing that import let the application start again.\r\nThen I commented in the auto_actions again and everything was find.\r\nMy learnings: Errors can be shadowed ...."}}