Is there a prettier version for this snippet of code?
@available_option_types.delete_if {|ot|
result = true
result = current_user.retailer.id != ot.retailer.id if ot.retailer.present?
result
} unless current_user.has_role? 'admin'
Thank you!
Or it would be even prettier if you put some logic into the model: