上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 44 下一页
摘要: chatroom.coffee中的js代码: document.addEventListener 'turbolinks:load', -> document.getElementById("new_message").addEventListener "keypress", (e) -> if e 阅读全文
posted @ 2018-07-17 19:05 Mr-chen 阅读(130) 评论(0) 推荐(0) 编辑
摘要: https://github.com/rails/jbuilder Jbuilder(3300✨) Jbuilder gives you a simple DSL for declaring JSON structures that beats manipulating giant hash str 阅读全文
posted @ 2018-07-17 09:52 Mr-chen 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 这个是coffeescript代码 document.addEventListener 'turbolinks:load', -> document.getElementById("new_message").addEventListener "keypress", (e) -> console.l 阅读全文
posted @ 2018-07-16 21:16 Mr-chen 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 视频: https://gorails.com/episodes/how-actioncable-uses-redis?autoplay=1 原理PubSub, 你进入一个频道,然后就能接收,和发布信息给频道中的所有人。 Redis CLI 假设已经安装redis。在terminal运行: redi 阅读全文
posted @ 2018-07-14 17:24 Mr-chen 阅读(282) 评论(0) 推荐(0) 编辑
摘要: GoRails视频系列: 1. 用actioncable建立Notifications 2. 见博客: 3. 非认证/登陆user不能使用actioncable 用ActionCable 建立 Realtime Notifications 在离线保存的全栈文件/我的练习/ajax网页应用/ajax- 阅读全文
posted @ 2018-07-13 21:35 Mr-chen 阅读(455) 评论(0) 推荐(0) 编辑
摘要: received: function(data) { $("#notifications").prepend(data.html); } 如何用原生js写出jquery的功能: 先创建<div>节点,然后附加到需求元素的内部,然后改变这个<div>的innerHTML。 var p = docume 阅读全文
posted @ 2018-07-13 20:30 Mr-chen 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Learn how the new Rails UJS library works and compares with the old version of jquery_ujs that it replaces rails/actionview/app/assets/javascripts/.. 阅读全文
posted @ 2018-07-12 22:42 Mr-chen 阅读(432) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/chentianwei/diary/2018/07/11/9296126.html 这篇日记记录了我遇到的invalidAuthenticaitonToken问题,以下是补充这方面的知识欠缺: 解决办法: skip_before_action :ver 阅读全文
posted @ 2018-07-12 16:11 Mr-chen 阅读(1201) 评论(0) 推荐(0) 编辑
摘要: 视频: https://gorails.com/episodes/how-to-use-turbolinks-clearCache?autoplay=1 用途: 更方便的实时从服务器更新局部网页,在这页更新了一条记录的显示方式, 再打开的之前网页的相同位置或相同的功能模块显示也会同步更新。 把Tur 阅读全文
posted @ 2018-07-11 21:55 Mr-chen 阅读(655) 评论(0) 推荐(0) 编辑
摘要: 一个软件task管理和build 自动化的工具。 它允许用户指定tasks和describe dependencies, 也可以在一个namespace中group tasks。 使用Ruby语言写的。 rake -h看帮助 rake -T列出所有rake task. 可以用rake编写脚步任务。 阅读全文
posted @ 2018-07-10 21:50 Mr-chen 阅读(132) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 44 下一页