0
to_json이 사용되지 않으며 as_json이 문제를 일으킨다는 것을 알고 있습니다.레일즈 3 자바 스크립트에서 json 인코딩 사용
이 줄은 잘 작동하지만 to_json이되지 않습니다 :
new IS.Presentation(<%= raw(@course_step.step.step_presentation.step_presentation_files.map { |item| {'url' => item.slide.url, 'title' => item.title}}.to_json) %>)
어떤 아이디어?
덕분에,이 일 : 새로운 IS.Presentation (<% = 원시 (ActiveSupport :: JSON.encode (@course_step. step.step_presentation.step_presentation_files.map {| item | { 'url'=> item.slide.url, 'title'=> item.title}})) %) –