Hi Don,
Don't worry about the weird things. They happen to all of us until we
fix them and forget they ever happened :D.
I'm not sure why your remote->true requests are not being sent as Ajax.
The controller should not break this. Can you provide an example so I
can reproduce (and maybe fix it)?
About current_user, I just took a look at Hobo's source and it should be
easy to create your own. Add this to the controller and you should have
@current_user available:
before_filter do
id = session._?[:user]
@current_user = (id && Hobo::Model.find_by_typed_id(id) rescue nil)
|| ::Guest.new
end
Warm regards,
Ignacio
El 04/12/13 00:48, Donald Ziesig escribió:
> Hi All!
>
> A while ago I discovered that having *hobo_controller* at the top of a
> controller's code caused controls with *remote=>true *to generate html
> requests rather than the expected javascript requests. I meant to
> report that here, then, but forgot. (Now I can't remember what lead me
> to comment it out in the first place :-[ ).
>
> I just discovered that when*hobo_controller* is not present,
> *current_user* is undefined, and now I need *current_user* in the
> controller. I'm between a rock and a hard place with this, since I use
> a lot of javascript to make the app speedy and it has gone away when
> *hobo_controller* is called.
>
> Interestingly, *current_user* is available in the views called by the
> controller, otherwise the app would be totally broken
> when***hobo_controller* is absent.
>
> Has anyone else encountered this? Does anyone have any idea why this is
> happening or a work-around? Why do these weird things happen to me?:'(
>
> Thanks,
>
> Don Ziesig
>
> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/groups/opt_out.
--
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.