def credit_card 
      @customer = Customer.find           params[:id]
      @customer.update_credit_card        Card.new params[:credit_card]

      respond_to do |format|
        format.html { redirect_to @customer, 
                      notice: "This customer's card was successfully updated." } 
        format.json { head :ok }
      end 
    end
def credit_card 
      @customer = Customer.find           params[:id]
      @customer.update_credit_card        Card.new params[:credit_card]

      respond_to do |format|
        format.html { redirect_to @customer, 
                      notice: "This customer's card was successfully updated." } 
        format.json { head :ok }
      end 
    end
PUT /customers/37/credit_card
 Assigns a credit card to the given customer