Sha256: eb40aa87f665a600021a4ee51bf16b10fe8939d765fb6ee75404c97d76fd12ed

Contents?: true

Size: 439 Bytes

Versions: 1

Compression:

Stored size: 439 Bytes

Contents

module Cadenero
  class User < ActiveRecord::Base
    attr_accessible :email, :password, :password_confirmation
    has_secure_password
    has_many :accounts, class_name: "Cadenero::V1::Account", foreign_key: "owner_id"
    has_many :members, class_name: "Cadenero::Member"
    has_many :memberships, through: :members, source: :account

    def auth_token      
      accounts[0].authentication_token if accounts[0]
    end
  
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cadenero-0.0.2.a3 app/models/cadenero/user.rb