What you're missing is handling new records.  Add new_record? to view 
permitted either as an early return or as part of your boolean logic.  btw, 
I find early returns clearer to read when you've got more than 2-3 booleans.

example:

def view_permitted?(field)
  return true if new_record?
  return true if acting_user.administrator?
  acting_user.in?(reviews) or owner_is?(acting_user)
end

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