Sha256: dc7edae1d7101096aaca2b42310ae6083213819bdc93b6e96dc94cd5a6a4205e

Contents?: true

Size: 305 Bytes

Versions: 11

Compression:

Stored size: 305 Bytes

Contents

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc12 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc11 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc10 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc9 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc8 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc7 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc6 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc5 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc4 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc2 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.0.0.rc1 app/helpers/locomotive/accounts_helper.rb