Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
JackM
@dudu_zzzz
会员
第 19766 位会员 / 2015-07-06

有赞
杭州
8 篇帖子 / 115 条回帖
2 关注者
0 正在关注
3 收藏
字节跳动视频架构组
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 分享一次排查问题的过程 at 2016年03月25日

    大赞,感觉很有收获

  • Turbolinks 遇上 多说 at 2016年03月17日
    var duoshuoQuery = {short_name:"xxxx"};
    $.getScript("http://static.duoshuo.com/embed.js",function(){
      var dus=$(".ds-thread");
      var dr=$("#ds-thread");
      if($(dus).length==1 && $(dr).length==0){
          var el = document.createElement('div');
          el.setAttribute('data-thread-key',$(dus).attr("data-thread-key"));
          el.setAttribute('data-url',$(dus).attr("data-url"));
          DUOSHUO.EmbedThread(el);
          $(dus).html(el);
      }
    })
    

    使用 jquery.getScript() 可以完美解决 turbolinks 环境下的问题

  • 如何利用 Rails 实现一个类似 curl 功能的 API at 2016年03月10日

    学 ruby 的时候,用这个写小爬虫玩,

  • 如何利用 Rails 实现一个类似 curl 功能的 API at 2016年03月10日

    看看 Net::HTTP

  • 发短信给 Android 或者 iOS 用户 at 2016年03月04日

    哈哈,重要的事情说三遍 @pathbox

  • Rails Model 继承的疑问 at 2016年02月29日

    我这边刚用过关联的继承,没有问题,rails 版本是 4.2.1 @rei

  • [请教] update_attributes! 这里的感叹号是起什么作用? at 2016年02月26日

    update_attributes! 这个就是名称,含义见楼上。 类似的还有 empty? ,也是名称里带了?

  • 各位都是因为原因什么走上 Ruby 之路的? at 2016年02月25日

    去实习,公司用的 rails。尝试之后再也不想写 php 或 java 了

  • 请问各位 Rubyist 有多少是科班出生的?想做一个简单调研。 at 2016年01月27日

    科班快要出身了,php-> java -> ruby

  • Rails 程序员如何进阶? at 2016年01月12日

    #4 楼 @raven 确实是我欠缺的方面

  • Vagrant 虚拟机启动项目无法访问 at 2016年01月11日

    看看防火墙关了没

  • 送几本《AngularJS 学习手册》 at 2016年01月04日

    分母 +1

  • Ruby 中没有 “逻辑与” 的短路原则吗? at 2015年12月29日

    @adamshen 太酷了!!这个编译后的结果是怎么查看的呢?

  • 用 SPA 的框架开发的应用如何和 Rails 的 Server 一起部署到同一台服务器? at 2015年12月25日

    rails server 启动的时候选一下端口就可以了。

    rails s -b 0.0.0.0 -p 3001
    
  • [新手] Rails 如何在 model 中访问到 controller 中的方法 at 2015年12月24日

    PS:问题后来的解决方法是我把现有的代码 copy 了一份到我自己的 model 中。

    我觉得这就是正确的做法了,操作 model 的方法就放在 model 里,操作多个 model 的方法就写个模块去 include。

  • 请教大家一个问题,Rails 怎么模糊查询 MySQL at 2015年11月30日

    http://guides.ruby-china.org/active_record_querying.html 关于 active_record 查询

  • after_save 回调被多次调用的问题 at 2015年11月09日

    发现是 active_record 的问题 坑! 在新建我的 Group Model 时,执行了三次 save 操作,第一次插入一个 group,然后插入一个 GroupAccount,然后更新 group 的值,加入了 member_count。

    ··· SQL (8.6ms) INSERT INTO groups (type, name, description, logo, creator_id, status, formal_type, talk_count, subject_count, recommend_count, posts_count, active_member_count, games_count, subs_count, created_at, updated_at) VALUES ('Groups::GameGroup', 'funn', 'hi', 'logo', 262763, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2015-11-08 23:31:24', '2015-11-08 23:31:24') SQL (1.7ms) INSERT INTO groups_accounts (group_id, talk_count, subject_count, recommend_count, post_count, account_id, created_at, updated_at) VALUES (2086, 0, 0, 0, 0, 262763, '2015-11-08 23:31:24', '2015-11-08 23:31:24') SQL (0.9ms) UPDATE groups SET type = 'Groups::GameGroup', name = 'funn', description = 'hi', logo = 'logo', creator_id = 262763, status = 0, formal_type = 0, talk_count = 0, subject_count = 0, recommend_count = 0, posts_count = 0, active_member_count = 0, subs_count = 0, created_at = '2015-11-08 23:31:24', updated_at = '2015-11-08 23:31:24', id = 2086, member_count = 1 WHERE groups.id = 2086 ···

  • after_save 回调被多次调用的问题 at 2015年11月09日

    补充一下 如果把 base.send :after_save ,:async_reindex 改成 base.send :after_create ,:async_reindex,那么 queue 的 size 是 2, 再改成 base.send :after_commit ,:async_reindex,queue 的 size 是 0,我懵的不行。

  • 了解 RSpec 源码的指点下,可以把测试失败的信息记录到数据库吗? at 2015年11月06日

    我感觉可以先记在 log 里,然后再写个脚本从 log 里读出来

  • Rails 小白求助,阿里云上运行 rails server 后,怎么在本地浏览器访问啊? at 2015年10月26日

    顺便啰嗦一条 rails s -b 0.0.0.0 -e production 可以选择在哪个环境启动 rails server

    关于命令行可以看这里,http://guides.rubyonrails.org/command_line.html#rails-server

  • Rails 学到什么程度能去找实习? at 2015年10月13日

    之前学过 java,rails 一点也不会,也去了 rails 的公司实习

  • Rails ActiveRecord::PendingMigrationError 错误 at 2015年09月06日

    这个问题我一开始在 windows 上也遇到过,真的不建议在 win 上玩 rails

  • 上一页
  • 1
  • 2
  • 3
  • 4
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English