doh, I'm sorry.  sleep deprived lately.

watch your solution there as it will grab every other user so if your
user base is large, that will be a real memory hog/slowdown.

could try (I'm not sure if acting_user is defined at this point or
not), "User unless owner_is? acting_user" # using owner_is? avoids
having to load the association if not already loaded.

That should work if acting_user is available when it evaluates.
should return false if owner_is? acting_user and User if not.  That's
a little unintuitive that passing true to available_to doesn't make it
available.

On Oct 7, 1:48 pm, Denis <[email protected]> wrote:
> Hi,
>
> Your suggestions have guided me to right solution : )
> Correct way to do that I need is following:
>             :available_to => "User.is_not(#{:owner})"
>
> Thank you.
>
> Denis.
>
> On 7 окт, 00:32, kevinpfromnm <[email protected]> wrote:
>
> > hmm... it should evaluate a string in the context of the record and
> > then (for this example) see if that acting_user is the return... ahh,
> > there's the rub.
>
> > "User if !owner"
>
> > that should work.
>
> > On Oct 6, 2:01špm, Denis <[email protected]> wrote:
>
> > > Hello,
>
> > > Thank you for ideas. Unfortunately it does not work for me.
> > > Here is my belongs_to string:
>
> > > š belongs_to :owner, :class_name => "User", :creator => true
>
> > > Denis
>
> > > On 6 ÏËÔ, 22:28, kevinpfromnm <[email protected]> wrote:
>
> > > > try "!owner"
>
> > > > or "!user" if you have user as your belongs_to association.
>
> > > > On Oct 5, 3:33špm, Denis <[email protected]> wrote:
>
> > > > > Hello,
>
> > > > > How :available_to option should look like to make transition available
> > > > > to all signed users except for owner of object?
>
> > > > > Thank you in advance,
>
> > > > > Denis

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