{"issue":{"user":{"id":96296,"login":"jmaskell","url":"https://api.github.com/users/jmaskell","avatar_url":"https://secure.gravatar.com/avatar/734ffea546bfb3892b9c1d85fa33e3d1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"734ffea546bfb3892b9c1d85fa33e3d1"},"title":"Tabulous and Devise Controllers","milestone":null,"created_at":"2011-12-21T14:05:14Z","labels":[],"state":"closed","updated_at":"2011-12-21T20:19:55Z","id":2625215,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/techiferous/tabulous/issues/6","closed_at":"2011-12-21T20:19:55Z","body":"Hi there,\r\n\r\nI'm trying to get tabulous working with devise but am having trouble with the devise controllers.\r\n\r\nIn config.tabs I have the following line which correctly generates a \"Sign Up\" tab when the user is not signed in:\r\n\r\n    [:signup_tab, \"Sign Up\", new_user_registration_path, !user_signed_in? , true ]\r\n\r\nProblems occur when trying to get the tabs to render on the signup page and show \"Sign Up\" as the active tab. For example, if I have the following line in config.actions I get an exception error:\r\n\r\n    [:devise/registrations, :all_actions, :signup_tab]\r\n\r\n    undefined local variable or method `registrations' for #<#<Class:0x007fa8902f40f0>:0x007fa88d881160>\r\n\r\n\"rake routes\" shows that I should be using \"devise/registrations\" as the controller:\r\n\r\n    new_user_registration GET    /users/sign_up(.:format)                                      {:action=>\"new\", :controller=>\"devise/registrations\"}\r\n\r\nAs far as I can see, registrations is a controller itself, not a method within the devise controller.\r\n\r\nIs there any way around this?","number":6,"url":"https://api.github.com/repos/techiferous/tabulous/issues/6","comments":1,"assignee":null},"comment":{"user":{"id":131868,"login":"techiferous","url":"https://api.github.com/users/techiferous","avatar_url":"https://secure.gravatar.com/avatar/1abbd7a043b9e2c32eada43e729e63d0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1abbd7a043b9e2c32eada43e729e63d0"},"created_at":"2011-12-21T20:19:55Z","updated_at":"2011-12-21T20:19:55Z","id":3238984,"body":"Hi jmaskell,\r\n\r\nThanks for bringing this to my attention.  The nature of your error is Ruby syntax.  :devise/registrations is not a valid Ruby symbol.  Ruby treats this as :devise / registrations, so it expects registrations to be a local variable and hence throws the error.  Tabulous does not expect you to provide the controller namespace, so you can simply provide :registrations as the controller name and it should work.  The following worked for me:\r\n\r\n    [ :sessions, :all_actions, :signup_tab ],\r\n    [ :registrations,  :all_actions, :signup_tab],\r\n\r\nwhich associated the sign up and sign in views with the \"Sign Up\" tab.\r\n\r\nI hope this gets you unstuck!\r\n\r\n--Wyatt\r\n","url":"https://api.github.com/repos/techiferous/tabulous/issues/comments/3238984"},"action":"created"}