Sha256: 24888f8af8fdff31d30d777c4f2405bbd3a5cf5354d57d9e46685bc400d61f4d

Contents?: true

Size: 309 Bytes

Versions: 26

Compression:

Stored size: 309 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.to_s] }
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.6 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.6.rc2 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.6.rc1 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.5 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.4 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.3 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.2 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.1 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.0 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.0.rc3 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.0.rc2 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.5.0.rc1 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.4.1 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.4.0 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.3.1 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.3.0 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.2.3 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.2.2 app/helpers/locomotive/accounts_helper.rb
locomotive_cms-2.2.1 app/helpers/locomotive/accounts_helper.rb