Ah, I changed hobo_model_controller in admin/users_controller.rb and
it showed up in the routes. Also had to add this to my admin/
users_controller.rb (just for anyone who may be having a similar
problem):

skip_before_filter :admin_required, :only =>
[:login, :logout, :forgot_password]

I deleted /app/controllers/users_controller.rb a while back, but the
problem didn't show up until I cleared out the auto taglibs. I'm
pretty new to Hobo, so I didn't realize the taglibs would cache things
in this way. Is it safe to .gitignore app/views/taglibs/auto/* ?

Jarin

On May 28, 5:24 am, Bryan Larsen <[email protected]> wrote:
> Very strange.
>
> Does it show up if you type "rake routes"?  Do you have
> hobo_user_controller in your users_controller.rb?
>
> Bryan
>
> On May 27, 10:08 pm, Jarin Udom <[email protected]> wrote:
>
>
>
> > It's the weirdest thing, my app was working fine a couple of weeks
> > ago, when I took a break to work on another project. Now when I try to
> > access the admin subsite, it seems to be returning nil from login_url.
> > I don't think I updated any gems in the meantime (although I have
> > updated to the latest hobo gem to see if it fixes the problem and it
> > didn't).
>
> > Here is the filter I have to handle the login requirement:
>
> > In /app/controllers/admin/admin_site_controller.rb:
>
> >  before_filter :admin_required
>
> >   def admin_required
> >     redirect_to login_url unless logged_in? &&
> > current_user.administrator?
> >   end
>
> > Here's the error I'm getting when I try to go tohttp://localhost:3000/admin
> > :
>
> > Processing Admin::AdminSiteController#index (for 127.0.0.1 at
> > 2009-05-27 19:06:47) [GET]
>
> > ActionController::ActionControllerError (Cannot redirect to nil!):
> >     /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > base.rb:1057:in `redirect_to_without_object_url'
> >     /vendor/plugins/hobo/hobo/lib/hobo/controller.rb:61:in
> > `redirect_to'
> >     /app/controllers/admin/admin_site_controller.rb:16:in
> > `admin_required'
> >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > callbacks.rb:178:in `send'
> >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > callbacks.rb:178:in `evaluate_method'
> >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > callbacks.rb:166:in `call'
> >     /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:225:in `call'
> >     /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:629:in `run_before_filters'
> >     /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:615:in `call_filters'
> >     /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:638:in `run_before_filters'
> > (etc)
>
> > I also get a routing error when trying to go tohttp://localhost:3000/login:
>
> > No route matches "/login" with {:method=>:get}
>
> > Any help would be greatly appreciated!
>
> > Best regards,
> > Jarin udom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to