내 도우미 파일에있는 코드는 다음과 같지만 작동하지 않습니다.
link_to objs.try(:send,:name) , eval("edit_#{objs.try(:class).try(:name).try(:downcase)}_path(objs,action_name: action)") , remote: true,style: "color: #{colour_picker_title objs.class.name.downcase} !important", data_toggle: "tooltip" ,class: "tooltip-class", title: ( get_right_by_role("delete_#{objs.class.name.downcase}_progress",objs.class.name.downcase) ? (objs.try(:send,:progresses).order("created_at DESC").limit(3).map{|pr| "#{pr.created_at.try(:strftime,"%d-%m-%Y")} : #{pr.description} <br>".html_safe}rescue "") : "")
이 후에 줄 바꿈을 추가하는 방법 :
map{|pr| "#{pr.created_at.try(:strftime,"%d-%m-%Y")} : #{pr.description} <br>".html_safe}
다음과 같이 맵 뒤에 \ n 줄 바꿈을 추가하십시오.
map{|pr| "#{pr.created_at.try(:strftime,"%d-%m-%Y")} : #{pr.description}"}.join("\n")
줄 바꿈이 추가됩니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다