engine/app/helpers/locomotive/accounts_helper.rb

14 lines
305 B
Ruby
Raw Normal View History

module Locomotive
module AccountsHelper
def admin_on?(site = current_site)
site.memberships.detect { |m| m.admin? && m.account == current_locomotive_account }
end
def options_for_account
current_site.accounts.collect { |a| ["#{a.name} <#{a.email}>", a.id] }
end
end
end