-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(Sorry for the delay, this email got a bit lost).

You are definitely right Kevin: that "small detail" can give you a lot
of headache, I've felt it myself :P.

Regards,
Ignacio

El 30/04/12 18:51, kevinpfromnm escribió:
> I'd just note that you probably want to use
> current_user.administrator? with the ? as the other doesn't
> necessarily return a boolean value and/or the guest model doesn't
> have a plain administrator method by default.
> 
> On Sunday, April 29, 2012 1:00:34 PM UTC-6, Ignacio Huerta wrote:
> 
> Hi Jake,
> 
> You can use this inside any tag:
> 
> if="&current_user.administrator"
> 
> This way you can have two pieces of code, one for the users and
> other for the admins.
> 
> If you don't know where to apply that post more of your code so we
> can see how to help you.
> 
> Regards, Ignacio
> 
> 
> 
> El 28/04/12 03:53, Jake K escribi�:
>> Hi there,
> 
>> I am trying to make the view link only appear to administrators 
>> for some children cards that are being displayed in a list on
>> their parent page. I'm building a review site and am displaying
>> all the review cards (children) on a category page (the parent
>> item they are reviewing). Because I'm showing all the fields for
>> each child inside the card on the list on the parent page, it's
>> not necessary to have a link to the view page for each one, but
>> Hobo seems to render the title of each review as a link
>> automatically. Is there any way I can have the title only be a
>> link for administrators (who may need to access the view page to
>> then edit the reviews)?
> 
>> Thanks, Jake
> 
> 
> 
> -- You received this message because you are subscribed to the
> Google Groups "Hobo Users" group. To view this discussion on the
> web visit 
> https://groups.google.com/d/msg/hobousers/-/lpxAbYL3JSMJ. 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.

- -- 
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+0AjwACgkQBPlUJ6RHaORoswCcCrPO+UPAQeMGeGhoo4aL2VkE
6A0AoKFwB7fMd/HCa8/ALKu77fu7FW0I
=NmxE
-----END PGP SIGNATURE-----

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