Sha256: 7caa262b5fe8976a10b6418191d9b2ce21a5ecff4a516540f8177baed46337fc

Contents?: true

Size: 548 Bytes

Versions: 4

Compression:

Stored size: 548 Bytes

Contents

module CitizenBudgetModel
  class User < ActiveRecord::Base
    devise :database_authenticatable,
           :recoverable, :rememberable, :trackable, :validatable

    belongs_to :organization

    after_create do |user|
      user.send_reset_password_instructions
    end

    # Returns whether a password is required.
    #
    # A password is not require to create a new user as an administrator.
    #
    # @return [Boolean] returns whether a password is required
    def password_required?
      new_record? ? false : super
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
citizen_budget_model-0.0.4 app/models/citizen_budget_model/user.rb
citizen_budget_model-0.0.3 app/models/citizen_budget_model/user.rb
citizen_budget_model-0.0.2 app/models/citizen_budget_model/user.rb
citizen_budget_model-0.0.1 app/models/citizen_budget_model/user.rb