{"action":"created","issue":{"url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/184","labels_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/184/comments","events_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/184/events","html_url":"https://github.com/digitalplaywright/mongoid-slug/issues/184","id":64896284,"number":184,"title":"Default Locale Slug is emptied, when another Locale has the same value","user":{"login":"wzowee","id":5781975,"avatar_url":"https://avatars.githubusercontent.com/u/5781975?v=3","gravatar_id":"","url":"https://api.github.com/users/wzowee","html_url":"https://github.com/wzowee","followers_url":"https://api.github.com/users/wzowee/followers","following_url":"https://api.github.com/users/wzowee/following{/other_user}","gists_url":"https://api.github.com/users/wzowee/gists{/gist_id}","starred_url":"https://api.github.com/users/wzowee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzowee/subscriptions","organizations_url":"https://api.github.com/users/wzowee/orgs","repos_url":"https://api.github.com/users/wzowee/repos","events_url":"https://api.github.com/users/wzowee/events{/privacy}","received_events_url":"https://api.github.com/users/wzowee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/labels/bug?","name":"bug?","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-28T04:11:47Z","updated_at":"2015-09-22T22:19:24Z","closed_at":null,"body":"When creating a document with a localized title and slug based off of this title, if only the english locale value is set first, and then another locale is set with the same value - the english slug value is removed.\r\n\r\nThis is very similar to an older issue #153 however the flow that surfaces it is.\r\n\r\n    page = PageSlugLocalized.create!(title:\"Title On English\") \r\n    # page[\"_slugs\"] returns {\"en\" => [\"title-on-english\"]}\r\n\r\n    # Switch Locales\r\n    I18n.locale = \"nl\"\r\n    page.update_attributes(title:\"Title On English\")\r\n\r\n    # page[\"_slugs\"] now returns {\"en\" => [], \"nl\" => [\"title-on-english\"]} \r\n\r\nSome environment versions:\r\nRails 4.2.0\r\nRuby  2.1.1p76\r\nmongoid-slug (4.0.0)"},"comment":{"url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/comments/142438103","html_url":"https://github.com/digitalplaywright/mongoid-slug/issues/184#issuecomment-142438103","issue_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/184","id":142438103,"user":{"login":"wzowee","id":5781975,"avatar_url":"https://avatars.githubusercontent.com/u/5781975?v=3","gravatar_id":"","url":"https://api.github.com/users/wzowee","html_url":"https://github.com/wzowee","followers_url":"https://api.github.com/users/wzowee/followers","following_url":"https://api.github.com/users/wzowee/following{/other_user}","gists_url":"https://api.github.com/users/wzowee/gists{/gist_id}","starred_url":"https://api.github.com/users/wzowee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzowee/subscriptions","organizations_url":"https://api.github.com/users/wzowee/orgs","repos_url":"https://api.github.com/users/wzowee/repos","events_url":"https://api.github.com/users/wzowee/events{/privacy}","received_events_url":"https://api.github.com/users/wzowee/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T22:19:24Z","updated_at":"2015-09-22T22:19:24Z","body":"Have created a spec based on my issue description above - it's passing :+1:  I should be back in the code base where I was having this issue originally this week so will check in see if it's still a problem and if the spec correctly covers the issue I'm seeing there.\r\n "}}