Sha256: cc85e68a7744d6bce921a5596b2218cf44577ec75f072c0a1fb891151f7e19ae

Contents?: true

Size: 425 Bytes

Versions: 9

Compression:

Stored size: 425 Bytes

Contents

module Locomotive
  class AccountPresenter < BasePresenter

    ## properties ##
    properties  :name, :email, :locale, :encrypted_password, :password_salt, :api_key
    property    :admin, only_getter: true

    with_options only_setter: true do |presenter|
      presenter.properties :password, :password_confirmation
    end

    ## other getters / setters ##

    def admin
      self.__source.admin?
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.6 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.6.rc2 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.6.rc1 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.5 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.4 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.3 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.2 app/presenters/locomotive/account_presenter.rb
locomotive_cms-2.5.1 app/presenters/locomotive/account_presenter.rb