Sha256: 78244e1fbc878d7cba737e1e72cbc803e098d9b6b996c6ebe933d7b6d84de259
Contents?: true
Size: 594 Bytes
Versions: 10
Compression:
Stored size: 594 Bytes
Contents
pageLoad = -> actionClassName = $('body').data('action-view') window.currentView = try eval("new #{actionClassName}()") catch error controllerClassName = $('body').data('controller-view') window.currentView = try eval("new #{controllerClassName}()") catch error new MagicView() window.currentView.render() $ -> pageLoad() # turbolinks $(document).on 'page:load', pageLoad $(document).on 'page:before-change', -> window.currentView.cleanup() true $(document).on 'page:restore', -> window.currentView.cleanup() pageLoad() true
Version data entries
10 entries across 10 versions & 2 rubygems