2012-02-04 01:10:55 +00:00
|
|
|
module Locomotive
|
|
|
|
module AccountsHelper
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2012-02-04 01:10:55 +00:00
|
|
|
def admin_on?(site = current_site)
|
|
|
|
site.memberships.detect { |m| m.admin? && m.account == current_locomotive_account }
|
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2012-02-04 01:10:55 +00:00
|
|
|
def options_for_account
|
|
|
|
current_site.accounts.collect { |a| ["#{a.name} <#{a.email}>", a.id] }
|
|
|
|
end
|
2011-12-22 00:31:33 +00:00
|
|
|
|
2012-02-04 01:10:55 +00:00
|
|
|
end
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|