On Apr 27, 7:33 pm, Bryan Larsen <[email protected]> wrote: > <show-page with="¤t_user"/> works for me, as long as a valid user > is logged in. If nobody's logged in, you get a blank screen. > > You can do something like: > > <if test="¤t_user.is_a? Guest"> > <p> Hello! </p> > </if> > <else> > <show-page with="¤t_user"/> > </else> >
Thanks. So we have acting_user in the model level and current_user in the view code. Would it make sense to unify these at some point? I tested this and it seems to work: <if test="¤t_user.signed_up?"> <show-page with="¤t_user" /> </if> <else> <page title="Home"> <!-- Page code here --> </page> </else> The only problem is getting (Not Available)'s in the side par for the list of a related model. > There are a couple of better ways of solving this problem. In your > front_controller.rb you can put something like: > > def index > if current_user.is_a? Guest > redirect_to login_url > else > redirect_to current_user > end > This would easily work around the problem above so sounds good too. Thanks for the help. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
