Sha256: 62a98df382bb1a6f6a527298f51f44f9c66a0e4292fd5c3ef328d536bab7b180
Contents?: true
Size: 539 Bytes
Versions: 12
Compression:
Stored size: 539 Bytes
Contents
###** Play nice with Rails UJS ======================== ### up.rails = (($) -> u = up.util isRails = -> !!$.rails u.each ['method', 'confirm'], (feature) -> dataAttribute = "data-#{feature}" upAttribute = "up-#{feature}" up.macro "[#{dataAttribute}]", ($element) -> if isRails() && up.link.isFollowable($element) replacement = {} replacement[upAttribute] = $element.attr(dataAttribute) u.setMissingAttrs($element, replacement) $element.removeAttr(dataAttribute) )(jQuery)
Version data entries
12 entries across 12 versions & 1 rubygems