{"action":"opened","issue":{"url":"https://api.github.com/repos/amoeba-rb/amoeba/issues/55","labels_url":"https://api.github.com/repos/amoeba-rb/amoeba/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/amoeba-rb/amoeba/issues/55/comments","events_url":"https://api.github.com/repos/amoeba-rb/amoeba/issues/55/events","html_url":"https://github.com/amoeba-rb/amoeba/issues/55","id":93024605,"number":55,"title":"Set user_id in association","user":{"login":"musixite","id":411987,"avatar_url":"https://avatars.githubusercontent.com/u/411987?v=3","gravatar_id":"","url":"https://api.github.com/users/musixite","html_url":"https://github.com/musixite","followers_url":"https://api.github.com/users/musixite/followers","following_url":"https://api.github.com/users/musixite/following{/other_user}","gists_url":"https://api.github.com/users/musixite/gists{/gist_id}","starred_url":"https://api.github.com/users/musixite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/musixite/subscriptions","organizations_url":"https://api.github.com/users/musixite/orgs","repos_url":"https://api.github.com/users/musixite/repos","events_url":"https://api.github.com/users/musixite/events{/privacy}","received_events_url":"https://api.github.com/users/musixite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-04T16:05:24Z","updated_at":"2015-07-04T16:05:24Z","closed_at":null,"body":"Hi there,\r\n\r\nI have a Tasklist & a Task Model.\r\n\r\nI'm using amoeba to duplicate one task list with its associated tasks.\r\nBoth Tasklist & Task have a user_id field.\r\n\r\nThe user_id is set to NULL by default.\r\n\r\nWhen I duplicate, I want the user_id to be set to the current_user.id (from Devise).\r\n\r\nI'm able to copy the task list with the proper user_id using:\r\n   @tasklist = Tasklist.find(topic_params[:tasklist])\r\n   @tasklist.user_id = current_user.id\r\n   @tasklist.tasks.user_id = current_user.id\r\n   @tasklist.amoeba_dup.save\r\n      \r\nTasks are also properly copied but the user_id is not updated in the copied tasks (only task list).\r\nI can't use the current_user.id in the Model with :set.\r\n\r\nSo I'm wondering how I can achieve this?\r\n\r\nThanks!\r\n- Vincent"}}