{"action":"created","comment":{"url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments/31405370","id":31405370,"diff_hunk":"@@ -37,4 +39,8 @@ class Account < ActiveRecord::Base\n   def downcase_subdomain\n     self.subdomain = subdomain.try(:downcase)\n   end\n+\n+  def single_tenant_mode?\n+    Hours.single_tenant_mode?\n+  end","path":"app/models/account.rb","position":23,"original_position":23,"commit_id":"6ca31ef15940eb2cf26599079a91e4314fd65513","original_commit_id":"6ca31ef15940eb2cf26599079a91e4314fd65513","user":{"login":"jurre","id":749864,"avatar_url":"https://avatars.githubusercontent.com/u/749864?v=3","gravatar_id":"","url":"https://api.github.com/users/jurre","html_url":"https://github.com/jurre","followers_url":"https://api.github.com/users/jurre/followers","following_url":"https://api.github.com/users/jurre/following{/other_user}","gists_url":"https://api.github.com/users/jurre/gists{/gist_id}","starred_url":"https://api.github.com/users/jurre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurre/subscriptions","organizations_url":"https://api.github.com/users/jurre/orgs","repos_url":"https://api.github.com/users/jurre/repos","events_url":"https://api.github.com/users/jurre/events{/privacy}","received_events_url":"https://api.github.com/users/jurre/received_events","type":"User","site_admin":false},"body":"Right, missed that you're using this in the validation here, this is fine then! :)","created_at":"2015-06-01T07:48:32Z","updated_at":"2015-06-01T07:48:32Z","html_url":"https://github.com/DefactoSoftware/Hours/pull/325#discussion_r31405370","pull_request_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325","_links":{"self":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments/31405370"},"html":{"href":"https://github.com/DefactoSoftware/Hours/pull/325#discussion_r31405370"},"pull_request":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325"}}},"pull_request":{"url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325","id":36157666,"html_url":"https://github.com/DefactoSoftware/Hours/pull/325","diff_url":"https://github.com/DefactoSoftware/Hours/pull/325.diff","patch_url":"https://github.com/DefactoSoftware/Hours/pull/325.patch","issue_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/325","number":325,"state":"open","locked":false,"title":"[READY] Current domain handles subdomain for multi tenant set true","user":{"login":"michalsz","id":187477,"avatar_url":"https://avatars.githubusercontent.com/u/187477?v=3","gravatar_id":"","url":"https://api.github.com/users/michalsz","html_url":"https://github.com/michalsz","followers_url":"https://api.github.com/users/michalsz/followers","following_url":"https://api.github.com/users/michalsz/following{/other_user}","gists_url":"https://api.github.com/users/michalsz/gists{/gist_id}","starred_url":"https://api.github.com/users/michalsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalsz/subscriptions","organizations_url":"https://api.github.com/users/michalsz/orgs","repos_url":"https://api.github.com/users/michalsz/repos","events_url":"https://api.github.com/users/michalsz/events{/privacy}","received_events_url":"https://api.github.com/users/michalsz/received_events","type":"User","site_admin":false},"body":"- [x] current_subdomain returns correct value if Hours.single_tenant_mode? is false\r\n- [x] user can create account if Hours.single_tenant_mode? is true\r\n- [x] current_subdomain returns correct value if Hours.single_tenant_mode? is true\r\n","created_at":"2015-05-25T21:02:19Z","updated_at":"2015-06-01T07:48:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54c601c26c4170c96b8c155f5bfe7bf71f8d083c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325/commits","review_comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325/comments","review_comment_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/325/comments","statuses_url":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/6ca31ef15940eb2cf26599079a91e4314fd65513","head":{"label":"michalsz:262-host-on-subdomain-in-single-tenant-mode","ref":"262-host-on-subdomain-in-single-tenant-mode","sha":"6ca31ef15940eb2cf26599079a91e4314fd65513","user":{"login":"michalsz","id":187477,"avatar_url":"https://avatars.githubusercontent.com/u/187477?v=3","gravatar_id":"","url":"https://api.github.com/users/michalsz","html_url":"https://github.com/michalsz","followers_url":"https://api.github.com/users/michalsz/followers","following_url":"https://api.github.com/users/michalsz/following{/other_user}","gists_url":"https://api.github.com/users/michalsz/gists{/gist_id}","starred_url":"https://api.github.com/users/michalsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalsz/subscriptions","organizations_url":"https://api.github.com/users/michalsz/orgs","repos_url":"https://api.github.com/users/michalsz/repos","events_url":"https://api.github.com/users/michalsz/events{/privacy}","received_events_url":"https://api.github.com/users/michalsz/received_events","type":"User","site_admin":false},"repo":{"id":36063325,"name":"Hours","full_name":"michalsz/Hours","owner":{"login":"michalsz","id":187477,"avatar_url":"https://avatars.githubusercontent.com/u/187477?v=3","gravatar_id":"","url":"https://api.github.com/users/michalsz","html_url":"https://github.com/michalsz","followers_url":"https://api.github.com/users/michalsz/followers","following_url":"https://api.github.com/users/michalsz/following{/other_user}","gists_url":"https://api.github.com/users/michalsz/gists{/gist_id}","starred_url":"https://api.github.com/users/michalsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalsz/subscriptions","organizations_url":"https://api.github.com/users/michalsz/orgs","repos_url":"https://api.github.com/users/michalsz/repos","events_url":"https://api.github.com/users/michalsz/events{/privacy}","received_events_url":"https://api.github.com/users/michalsz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michalsz/Hours","description":"Time registration that doesn't suck","fork":true,"url":"https://api.github.com/repos/michalsz/Hours","forks_url":"https://api.github.com/repos/michalsz/Hours/forks","keys_url":"https://api.github.com/repos/michalsz/Hours/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michalsz/Hours/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michalsz/Hours/teams","hooks_url":"https://api.github.com/repos/michalsz/Hours/hooks","issue_events_url":"https://api.github.com/repos/michalsz/Hours/issues/events{/number}","events_url":"https://api.github.com/repos/michalsz/Hours/events","assignees_url":"https://api.github.com/repos/michalsz/Hours/assignees{/user}","branches_url":"https://api.github.com/repos/michalsz/Hours/branches{/branch}","tags_url":"https://api.github.com/repos/michalsz/Hours/tags","blobs_url":"https://api.github.com/repos/michalsz/Hours/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michalsz/Hours/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michalsz/Hours/git/refs{/sha}","trees_url":"https://api.github.com/repos/michalsz/Hours/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michalsz/Hours/statuses/{sha}","languages_url":"https://api.github.com/repos/michalsz/Hours/languages","stargazers_url":"https://api.github.com/repos/michalsz/Hours/stargazers","contributors_url":"https://api.github.com/repos/michalsz/Hours/contributors","subscribers_url":"https://api.github.com/repos/michalsz/Hours/subscribers","subscription_url":"https://api.github.com/repos/michalsz/Hours/subscription","commits_url":"https://api.github.com/repos/michalsz/Hours/commits{/sha}","git_commits_url":"https://api.github.com/repos/michalsz/Hours/git/commits{/sha}","comments_url":"https://api.github.com/repos/michalsz/Hours/comments{/number}","issue_comment_url":"https://api.github.com/repos/michalsz/Hours/issues/comments{/number}","contents_url":"https://api.github.com/repos/michalsz/Hours/contents/{+path}","compare_url":"https://api.github.com/repos/michalsz/Hours/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michalsz/Hours/merges","archive_url":"https://api.github.com/repos/michalsz/Hours/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michalsz/Hours/downloads","issues_url":"https://api.github.com/repos/michalsz/Hours/issues{/number}","pulls_url":"https://api.github.com/repos/michalsz/Hours/pulls{/number}","milestones_url":"https://api.github.com/repos/michalsz/Hours/milestones{/number}","notifications_url":"https://api.github.com/repos/michalsz/Hours/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michalsz/Hours/labels{/name}","releases_url":"https://api.github.com/repos/michalsz/Hours/releases{/id}","created_at":"2015-05-22T09:14:43Z","updated_at":"2015-05-22T09:14:44Z","pushed_at":"2015-05-31T19:58:33Z","git_url":"git://github.com/michalsz/Hours.git","ssh_url":"git@github.com:michalsz/Hours.git","clone_url":"https://github.com/michalsz/Hours.git","svn_url":"https://github.com/michalsz/Hours","homepage":"https://happyhours.io","size":7746,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"DefactoSoftware:development","ref":"development","sha":"07a865d63ac1f22da25a0a080e73930b3fd2f64b","user":{"login":"DefactoSoftware","id":3899757,"avatar_url":"https://avatars.githubusercontent.com/u/3899757?v=3","gravatar_id":"","url":"https://api.github.com/users/DefactoSoftware","html_url":"https://github.com/DefactoSoftware","followers_url":"https://api.github.com/users/DefactoSoftware/followers","following_url":"https://api.github.com/users/DefactoSoftware/following{/other_user}","gists_url":"https://api.github.com/users/DefactoSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/DefactoSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefactoSoftware/subscriptions","organizations_url":"https://api.github.com/users/DefactoSoftware/orgs","repos_url":"https://api.github.com/users/DefactoSoftware/repos","events_url":"https://api.github.com/users/DefactoSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/DefactoSoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":17153103,"name":"Hours","full_name":"DefactoSoftware/Hours","owner":{"login":"DefactoSoftware","id":3899757,"avatar_url":"https://avatars.githubusercontent.com/u/3899757?v=3","gravatar_id":"","url":"https://api.github.com/users/DefactoSoftware","html_url":"https://github.com/DefactoSoftware","followers_url":"https://api.github.com/users/DefactoSoftware/followers","following_url":"https://api.github.com/users/DefactoSoftware/following{/other_user}","gists_url":"https://api.github.com/users/DefactoSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/DefactoSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefactoSoftware/subscriptions","organizations_url":"https://api.github.com/users/DefactoSoftware/orgs","repos_url":"https://api.github.com/users/DefactoSoftware/repos","events_url":"https://api.github.com/users/DefactoSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/DefactoSoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DefactoSoftware/Hours","description":"Time registration that doesn't suck","fork":false,"url":"https://api.github.com/repos/DefactoSoftware/Hours","forks_url":"https://api.github.com/repos/DefactoSoftware/Hours/forks","keys_url":"https://api.github.com/repos/DefactoSoftware/Hours/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DefactoSoftware/Hours/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DefactoSoftware/Hours/teams","hooks_url":"https://api.github.com/repos/DefactoSoftware/Hours/hooks","issue_events_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/events{/number}","events_url":"https://api.github.com/repos/DefactoSoftware/Hours/events","assignees_url":"https://api.github.com/repos/DefactoSoftware/Hours/assignees{/user}","branches_url":"https://api.github.com/repos/DefactoSoftware/Hours/branches{/branch}","tags_url":"https://api.github.com/repos/DefactoSoftware/Hours/tags","blobs_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/refs{/sha}","trees_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/{sha}","languages_url":"https://api.github.com/repos/DefactoSoftware/Hours/languages","stargazers_url":"https://api.github.com/repos/DefactoSoftware/Hours/stargazers","contributors_url":"https://api.github.com/repos/DefactoSoftware/Hours/contributors","subscribers_url":"https://api.github.com/repos/DefactoSoftware/Hours/subscribers","subscription_url":"https://api.github.com/repos/DefactoSoftware/Hours/subscription","commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/commits{/sha}","git_commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/commits{/sha}","comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/comments{/number}","issue_comment_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/comments{/number}","contents_url":"https://api.github.com/repos/DefactoSoftware/Hours/contents/{+path}","compare_url":"https://api.github.com/repos/DefactoSoftware/Hours/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DefactoSoftware/Hours/merges","archive_url":"https://api.github.com/repos/DefactoSoftware/Hours/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DefactoSoftware/Hours/downloads","issues_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues{/number}","pulls_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls{/number}","milestones_url":"https://api.github.com/repos/DefactoSoftware/Hours/milestones{/number}","notifications_url":"https://api.github.com/repos/DefactoSoftware/Hours/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DefactoSoftware/Hours/labels{/name}","releases_url":"https://api.github.com/repos/DefactoSoftware/Hours/releases{/id}","created_at":"2014-02-24T22:25:47Z","updated_at":"2015-05-27T04:28:31Z","pushed_at":"2015-05-31T19:58:33Z","git_url":"git://github.com/DefactoSoftware/Hours.git","ssh_url":"git@github.com:DefactoSoftware/Hours.git","clone_url":"https://github.com/DefactoSoftware/Hours.git","svn_url":"https://github.com/DefactoSoftware/Hours","homepage":"https://happyhours.io","size":13720,"stargazers_count":567,"watchers_count":567,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":31,"forks":70,"open_issues":31,"watchers":567,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325"},"html":{"href":"https://github.com/DefactoSoftware/Hours/pull/325"},"issue":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/issues/325"},"comments":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/issues/325/comments"},"review_comments":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325/comments"},"review_comment":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/325/commits"},"statuses":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/6ca31ef15940eb2cf26599079a91e4314fd65513"}}}}