. :
jquery-ujs, URL , . , data, href.
$.rails.href = function(el) {
var $el = $(el);
return $el.attr('data-url') || $el.attr('data-href') || $el.attr('href');
}
. , , URL- data, href.
def pseudo_link_to(name = nil, options = nil, html_options = nil, &block)
html_options, options, name = options, name, block if block_given?
options ||= {}
html_options = convert_options_to_data_attributes(options, html_options)
url = url_for(options)
html_options["data-href".freeze] ||= url
html_options['href'] = 'javascript:void(0)'
content_tag("a".freeze, name || url, html_options, &block)
end
, href javascript:void(0), javascript no-op.
, , pseudo_link_to link_to.