{"action":"created","issue":{"url":"https://api.github.com/repos/voltrb/volt/issues/135","labels_url":"https://api.github.com/repos/voltrb/volt/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/voltrb/volt/issues/135/comments","events_url":"https://api.github.com/repos/voltrb/volt/issues/135/events","html_url":"https://github.com/voltrb/volt/issues/135","id":66606188,"number":135,"title":"Redirecting","user":{"login":"KillaPL","id":1272828,"avatar_url":"https://avatars.githubusercontent.com/u/1272828?v=3","gravatar_id":"","url":"https://api.github.com/users/KillaPL","html_url":"https://github.com/KillaPL","followers_url":"https://api.github.com/users/KillaPL/followers","following_url":"https://api.github.com/users/KillaPL/following{/other_user}","gists_url":"https://api.github.com/users/KillaPL/gists{/gist_id}","starred_url":"https://api.github.com/users/KillaPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KillaPL/subscriptions","organizations_url":"https://api.github.com/users/KillaPL/orgs","repos_url":"https://api.github.com/users/KillaPL/repos","events_url":"https://api.github.com/users/KillaPL/events{/privacy}","received_events_url":"https://api.github.com/users/KillaPL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-06T13:27:15Z","updated_at":"2015-04-06T18:25:56Z","closed_at":null,"body":"Hello\r\n\r\nSorry if I'm spamming at this point, but I feel that these issues should be simple to implement, or at least explained.\r\n\r\nI wanted to do a simple thing: On root route I want to redirect user to one url if logged in ( if Volt.user_id ), and to another if not logged in.\r\n\r\nI found out the \r\n\r\n    go\r\n\r\nmethod, which led me to try this:\r\n\r\n    def index\r\n      if Volt.user_id\r\n        go \"/chat\"\r\n      else\r\n        go \"/login\"\r\n      end\r\n    end\r\n\r\nHowever, I have a couple of problems/questions with this:\r\n\r\n1. This doesn't seem to get executed if there is no underlying template for this path. Is this by design? \r\n2. If this code decides to go to /login page, it throws a lot of errors and makes the page unusable:\r\n\r\n    IfBinding:433 error: #<NoMethodError: 'undefined method `use_username?' for <Volt::Model:254 {}>'>\r\n    function (){var self = TMP_77._s || this;\r\n\r\n        return self['$use_username?']()}\r\n    page.js:13344 AttributeBinding Error: #<NoMethodError: 'undefined method `login' for <Volt::Model:254 {}>'>\r\n    page.js:13344 AttributeBinding Error: #<NoMethodError: 'undefined method `password' for <Volt::Model:254 {}>'>\r\n\r\nAnd when I try logging in:\r\n\r\n    Uncaught NoMethodError: undefined method `do_login' for <Volt::Model:254 {}>\r\n\r\nHow can I go about implementing a simple redirect? This seems like a reasonable feature to have: )\r\n"},"comment":{"url":"https://api.github.com/repos/voltrb/volt/issues/comments/90185636","html_url":"https://github.com/voltrb/volt/issues/135#issuecomment-90185636","issue_url":"https://api.github.com/repos/voltrb/volt/issues/135","id":90185636,"user":{"login":"KillaPL","id":1272828,"avatar_url":"https://avatars.githubusercontent.com/u/1272828?v=3","gravatar_id":"","url":"https://api.github.com/users/KillaPL","html_url":"https://github.com/KillaPL","followers_url":"https://api.github.com/users/KillaPL/followers","following_url":"https://api.github.com/users/KillaPL/following{/other_user}","gists_url":"https://api.github.com/users/KillaPL/gists{/gist_id}","starred_url":"https://api.github.com/users/KillaPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KillaPL/subscriptions","organizations_url":"https://api.github.com/users/KillaPL/orgs","repos_url":"https://api.github.com/users/KillaPL/repos","events_url":"https://api.github.com/users/KillaPL/events{/privacy}","received_events_url":"https://api.github.com/users/KillaPL/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T18:25:56Z","updated_at":"2015-04-06T18:25:56Z","body":"Oh. Is there anything I can do to help? I can push the repo to github."}}