1
에 기호를 변환 할 수 없습니다받을 난 다음 내 twilio 응용 프로그램 내 컨트롤러에 코드 라인 "... ID = 사용자"당신이에 오류가 표시되므로 있습니다오류 메시지가 정수
class CallsController < ApplicationController
def play
user = Refugee.find_all_by_cell_number(params[:id]) && Student.find_all_by_cell_number(params[:id])
id = user[:last_class].to_i
lesson = RecordedLesson.find(id).next
user[:last_class] = lesson.id
user.save
@audio_lesson_url = lesson.sound_file.url
render :action => "play.xml.builder", :layout => false
end
end
에게
은 그 때 나는 다음과 같은 오류 메시지를받을
이 나는 다음과 같은 마이그레이션을 실행 있다는 사실에도 불구하고app/controllers/calls_controller.rb:7:in `play'=2012-09-18T04:00:13+00:00 app[web.1]: TypeError (can't convert Symbol into Integer):
class ChangeLastClassOfStudents < ActiveRecord::Migration
def change
change_column :students, :last_class, :integer, :null => true
end
end
감사합니다. 죄송합니다. 저는 자주 stackoverflow 사용자가 아니기 때문에 그것에 대해 실제로 알지 못했습니다. – user924088