OK, for those of us who like visuals, I have a very short screen cast
of this line of code added to front/index.dryml in action:

http://screencast.com/t/YWUxYTli

Current user:  <a with ="&current_user.name"> </a>'


On Mar 12, 3:22 pm, Owen Dall <[email protected]> wrote:
> Mmmm. Thanks.
>
>
>
> On Fri, Mar 12, 2010 at 3:14 PM, Matt Jones <[email protected]> wrote:
> > acting_user is *only* available on model objects, and even then only
> > typically within the context of a save/update transaction or in a permission
> > check.
>
> > current_user is the one to use in view/controller code.
>
> > --Matt Jones
>
> > On Mar 12, 2010, at 3:10 PM, Owen Dall wrote:
>
> >  While we are on the subject, in which context is "self.acting_user"
> >> available?
>
> >> For example, so we can build a tag to display the user...
>
> >> On Fri, Mar 12, 2010 at 2:45 PM, kevinpfromnm <[email protected]>
> >> wrote:
> >> well, there's no real choice in the model, you only have acting_user.
> >> the point I was making is there is rarely a case where the model
> >> acting_user is not the same User as the controller current_user, since
> >> most time you're checking acting_user it was current_user passed
> >> behind the scenes from controller/view to the model.
>
> >> On Mar 12, 11:54 am, Owen <[email protected]> wrote:
> >> > Thanks, I think most folks will use "acting_user"
>
> >> > On Mar 12, 1:46 pm, kevinpfromnm <[email protected]> wrote:
>
> >> > > probably the bigger confusion is there's very few cases where the
> >> > > acting_user isn't going to be the current_user.  maybe in some special
> >> > > multipart lifecycle actions but I can't think of any other case that I
> >> > > might use a different acting_user.
>
> >> > > On Mar 12, 7:52 am, Owen <[email protected]> wrote:
>
> >> > > > Think this needs another discussion for all new to Hobo:
>
> >> > > > Here is a post from Tom a while back:
>
> >> > > > Although it is a common source of confusion, it's actually fairly
> >> > > > important to understand the difference between the two concepts, or
> >> > > > you're at risk of messing up your nice MVC separation. current_user
> >> > > > only makes sense in conjunction with the idea of a "current
> >> > > > session",
> >> > > > which only exists in the view and controller layers. That's why in
> >> > > > 'normal' Rails apps you just can't get at that information from the
> >> > > > model.
>
> >> > > > But it struck me that "this model-level action is happening on
> >> > > > behalf
> >> > > > some specific user" is such a fundamental aspect of the kind of apps
> >> > > > we right, that it was a good idea to support this in the model
> >> > > > layer.
>
> >> > > > As Bryan says, it's not _necessarily_ the current_user from the
> >> > > > session. Rather, it's the user who is performing this action - the
> >> > > > acting_user.
>
> >> > > > Sometimes a common source of confusion is a good thing, because
> >> > > > what's
> >> > > > actually going on is a common misconception, and the confusion is an
> >> > > > opportunity to straighten things out.
>
> >> > > > Tom
>
> >> --
> >> 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]<hobousers%[email protected]>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/hobousers?hl=en.
>
> >> --
> >> Thanks,
> >> - Owen
>
> >> --
> >> 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]<hobousers%[email protected]>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/hobousers?hl=en.
>
> > --
> > 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]<hobousers%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/hobousers?hl=en.
>
> --
> Thanks,
> - Owen

-- 
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