Skip to content

Instantly share code, notes, and snippets.

Created January 31, 2014 17:36
Show Gist options
  • Save anonymous/8738171 to your computer and use it in GitHub Desktop.
Save anonymous/8738171 to your computer and use it in GitHub Desktop.
Cleaner (shorter) way to write this?
def can_delete? (object)
r_val = false
r_val = can_delete_by_core_role? object
unless r_val
r_val = can_delete_by_owner? object
unless r_val
r_val = can_delete_by_zone_role? object
unless r_val
r_val = can_delete_by_access_profile? object
end
end
end
return r_val
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment