This seemed to work:
def view_permitted?(field)
return true if self == acting_user || acting_user.administrator?
|| self.new_record?
return false if (field.to_s == "email_address")
true
end
PS! You have to take a to_s on field to get it to match :-) I didn't
understand why they did not match, because they looked the same in my
debug log....
On Jan 13, 5:38 pm, Tiago Franco <[email protected]> wrote:
> Ah!
>
> How about kind_of?() or is_a?() Guest.
>
> TF
>
> On Jan 13, 4:29 pm, Tom Locke <[email protected]> wrote:
>
> > > return current_user_is? self
>
> > Trouble is, current_user is guest during sign-up
>
> > How about making email_address viewable if self.new_record?
>
> > 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]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---