engine/app/helpers/admin/accounts_helper.rb

9 lines
154 B
Ruby

module Admin::AccountsHelper
def admin_on?(site = current_site)
site.memberships.detect { |m| m.admin? && m.account == current_admin }
end
end