0
기본 블로그를 만들려면 루비 코드가 있어야합니다.Ruby가 취소 버튼이되어 링크가되지 않습니다.
비밀번호를 업데이트 할 때 사용자가 업데이트하거나 취소 할 수있는 버튼이 필요합니다. 이것은 '응용 프로그램 도우미'에 있습니다.
버튼으로 사용하고 싶지만 '취소'버튼으로 돌아가는 방법을 모르겠습니다. 현재 자바 스크립트와 텍스트이지만 업데이트 사용자는 버튼입니다. 나는이 아니 팬이하지만 난이
을 당신을 도움이 희망이module ApplicationHelper
# Creates a submit button with the given name with a cancel link
# Accepts two arguments: Form object and the cancel link name
def submit_or_cancel(form, name='Cancel')
form.submit + " or " +
link_to(name, '#',:onclick => 'history.go(-1);', :class => 'cancel')
end
end
처럼 뭔가를 시도 할 수 있습니다
module ApplicationHelper
# Creates a submit button with the given name with a cancel link
# Accepts two arguments: Form object and the cancel link name
def submit_or_cancel(form, name='Cancel')
form.submit + " or " +
link_to(name, 'javascript:history.go(-1);', :class => 'cancel')
end
end