#2 楼 @imwildcat MAX 256
#5 楼 @towonzhou 已经有了的啊
#44 楼 @gotzehsing 已解封
另外,我已经提交修复了,App Store Review 中,等待升级 1.1.2 版本
看 elasticsearch-model 的文档! https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model
另外,不知道 Ruby China 里面 Topic -> replies 的做法是不是你想要的:
https://github.com/ruby-china/ruby-china/blob/master/app/models/topic.rb#L70
#8 楼 @qinfanpeng 复杂的都要放到 JS 函数里面,避免服务端返回过多多余代码
Ruby China 也时常会遇到恶意攻击,一般都是有主机商的网络层来解决的。 @lgn21st 来说说细节
其实一开始我是在找 Turbolinks 里面是否有类似的方法,尝试了
Turbolinks.visit(location.href, { change: ['form-field-user-address'] });
但结果失败了,首先浏览器会滚动到顶部页面动了...
之前有段时间,我曾经检查过所有网站,打不开的就被删掉了,可能正好那次没法打开
据最近一段时间 Ruby China 上面运作来看,需要将 ActionCable 独立部署在单独的 Puma 进程上面,避免堵塞。ActionCable 官方文档关于 Deployment 部分也是这么说的:
Action Cable is powered by a combination of websockets and threads. All of the connection management is handled internally by utilizing Ruby’s native thread support, which means you can use all your regular Rails models with no problems as long as you haven’t committed any thread-safety sins.
But this also means that Action Cable needs to run in its own server process. So you'll have one set of server processes for your normal web work, and another set of server processes for the Action Cable.
The Action Cable server does not need to be a multi-threaded application server. This is because Action Cable uses the Rack socket hijacking API to take over control of connections from the application server. Action Cable then manages connections internally, in a multithreaded manner, regardless of whether the application server is multi-threaded or not. So Action Cable works with all the popular application servers -- Unicorn, Puma and Passenger.
Action Cable does not work with WEBrick, because WEBrick does not support the Rack socket hijacking API.
https://github.com/rails/rails/tree/master/actioncable#deployment
另外,还有好多细节也会影响性能的,比如前端需要确保用户关闭页面或退出对应功能的时候,一定会 Unsubscribe 关掉连接,不然后端会保持很多 ActionCable Connection 无法释放。
#41 楼 @gotzehsing 已经修复,并提交了 1.0.2 版本,等审核
#36 楼 @gotzehsing 对,我屏蔽过你的 IP,上次发现从你那个 IP 发来大量重复的请求
赞助商广告那张图有噪点,品质不够好,给一张新的吧
所有改动,走 Pull Request 的方式,先 Review 再合并到 Master
#58 楼 @cristinaoh 安全问题
华星现代产业园,哈哈哈 😄 以前我也待过
存在安全问题,又关掉了
总体下来,我觉得 Ionic 写 App 不好,流畅度不如 Native 客户端,要不是 HTML 渲染 Navtie 的方式不好解决,才不会走这条路
#1 楼 @xiaoronglv 厉害
beta1 的时候我也遇到了一个 multiple radio buttons 生成的 field name 变成 array 了