By credit you mean credit card not a credit txn right? If can_credit
returns false or does not exist assume the card cannot be credited. Card
type should be irrelevant.


On Wed, May 7, 2014 at 1:42 PM, Kyungmin Kim <notifications@github.com>wrote:

> In app/models/card.js:
>
> > @@ -30,7 +30,29 @@ Balanced.Card = Balanced.FundingInstrument.extend(Ember.Validations, {
> >  		}
> >  	},
> >
> > -	type_name: 'Card',
> > +	// type_name: 'Card',
> > +	type_name: function () {
> > +		if(this.get('can_credit')) {
> > +			return 'Debit card';
> > +		} else {
> > +			return 'Credit card';
> > +		}
> > +	}.property('can_credit'),
> > +
> > +	can_credit: true, // TODO: remove this
>
> Is it okay to assume a card is a credit if can_credit returns falsebecause the value doesn't exist?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/balanced/balanced-dashboard/pull/1226/files#r12401304>
> .
>