engine/app/helpers/admin/accounts_helper.rb

8 lines
161 B
Ruby
Raw Normal View History

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