ccschmitz
7/11/2012 - 8:14 PM

An example go_back_btn Rails helper

An example go_back_btn Rails helper

def go_back_url(fallback, text = 'Go Back')
  url = request.referer.blank?
  url = fallback if url.blank?
  
  link_to text, url, class: 'btn'
end