{"action":"closed","issue":{"url":"https://api.github.com/repos/pokonski/public_activity/issues/214","labels_url":"https://api.github.com/repos/pokonski/public_activity/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/pokonski/public_activity/issues/214/comments","events_url":"https://api.github.com/repos/pokonski/public_activity/issues/214/events","html_url":"https://github.com/pokonski/public_activity/issues/214","id":67865550,"number":214,"title":"How to track User registration (with Devise)?","user":{"login":"benjaminb10","id":2952678,"avatar_url":"https://avatars.githubusercontent.com/u/2952678?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminb10","html_url":"https://github.com/benjaminb10","followers_url":"https://api.github.com/users/benjaminb10/followers","following_url":"https://api.github.com/users/benjaminb10/following{/other_user}","gists_url":"https://api.github.com/users/benjaminb10/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminb10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminb10/subscriptions","organizations_url":"https://api.github.com/users/benjaminb10/orgs","repos_url":"https://api.github.com/users/benjaminb10/repos","events_url":"https://api.github.com/users/benjaminb10/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminb10/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-12T03:19:33Z","updated_at":"2015-04-12T11:22:16Z","closed_at":"2015-04-12T11:22:16Z","body":"Hi,\r\n\r\nI would like to create an activity when an user registers. Something like \"the_new_user_nickname has just registered'.\r\n\r\nIn my User.rb, I've added:\r\n```\r\ninclude PublicActivity::Model\r\ntracked only: :create, :owner => proc {|controller, model| controller.current_user}\r\n```\r\n\r\nBut the owner is nil.\r\nIndeed, current_user still doesn't exist at this time.\r\n\r\nI've also tried with\r\n```\r\n  tracked only: :create, :owner => proc {|controller, model| self}\r\n```\r\n\r\nBut I've the following error:\r\n```\r\nNoMethodError in Devise::RegistrationsController#create\r\nundefined method `primary_key' for Class:Class\r\n```\r\n\r\nAnd with `self.id`, I've got:\r\n```\r\nNoMethodError in Devise::RegistrationsController#create\r\nundefined method `id' for #<Class:0x007fb78e61c2e8>\r\n```\r\n\r\nAny clue?"}}