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:
>
> -----BEGIN PGP SIGNED MESSAGE----- 
> Hash: SHA1 
>
> 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 
> > 
>
> - -- 
> 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+dj9AACgkQBPlUJ6RHaOSMXgCfSPef4ygRqcP1zxUR9uqR9eNf 
> d+UAnA+LrOkw5JMrNubPa+R9+HT5MZ/X 
> =QD2m 
> -----END PGP SIGNATURE----- 
>

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

Reply via email to