Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Gabriel Wang
@Awlter1
Member
NO. 28788 / 2016-10-02

[email protected]
成都
36 Topics / 236 Replies
10 Followers
6 Following
33 Favorites
To make each day count.
GitHub Public Repos
  • react-online-store 1

  • task_management 0

  • kubernetes-rails-example 0

  • reminder 0

  • react-burger-builder 0

  • i18 0

  • leetcode_algo 0

  • writing 0

  • wechat 0

    API, command and message handling for WeChat in Rails

  • coding-interview-unive... 0

    A complete computer science study plan to become a software engineer.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 关于新增数据和非主键索引的关系 at December 23, 2018

    找到答案了。。

    https://stackoverflow.com/questions/23435361/does-mysql-update-the-index-on-all-inserts-can-i-make-it-update-after-every-x-i

  • Debugging memory leaks in Ruby at December 17, 2018

    是不是类似自己造轮子的意思

  • active job 序列化 Marshal.dump 出来的字符串报错 at November 05, 2018

    @coderliu 对,criteria 是个查询规则

    @Rei dump 出来的是查询规则,我上图吧

    @weito 嗯嗯,好的,看来 mongoid 这块还挺方便点

  • active job 序列化 Marshal.dump 出来的字符串报错 at November 05, 2018

    @coderliu 我那个集合是个 mongoid 的 criteria,to_json 是把所有数据取出来再 json 化

    @tuliang 我这里是为了拿 criteria

    @weito 谢谢,具体能秀一下具体的代码吗?我司大神给了一个简便的方法,用 base64 处理下 dump 出来的字符串就行了

  • Ruby China 7 岁生日快乐 at November 03, 2018

    Hooray

  • ajax delete 请求后页面不刷新 at October 25, 2018

    谢谢你,我看明白啦!

    顺着你的思路我想能不能把 ajax 伪装成一个普通的请求。。查了下好像不行

    https://stackoverflow.com/questions/6432320/how-to-make-an-ajax-request-look-like-a-regular-normal-request

  • ajax delete 请求后页面不刷新 at October 25, 2018

    十分感谢🙏解释的真清晰!

  • ajax delete 请求后页面不刷新 at October 25, 2018

    神说这个帖子要上代码,于是便有了代码

  • ajax delete 请求后页面不刷新 at October 25, 2018

    你说得对,我这里就是想表达跳转的 index 页面。项目里不是这么写的

  • ajax delete 请求后页面不刷新 at October 25, 2018

    能重新看一遍帖子吗兄得,我 google 解决了那个找不到路由的问题了。我的帖子问的是另外一个问题

  • ajax delete 请求后页面不刷新 at October 25, 2018

    hmm, 没太明白的你意思,有相关文章推荐下吗?

    确实是 route 到 destroy action 了,只是在 destroy action 中 redirect_to :index 时出现的问题

  • ajax delete 请求后页面不刷新 at October 24, 2018

    谢谢,我也看到重新定向那块了,https://stackoverflow.com/questions/46778581/redirection-to-a-get-after-a-put-in-rails-status-303-not-working,我研究下。

    我以为我设置了 format,之后就跟 ajax 没关了

    redirect_to xx_path(@course, format: :html), status: :see_other

  • Ruby Summit China 2018 PPT 下载以及在线视频播放 at October 19, 2018

    游猴有下载助手啊

  • 请问 我这里配置了两个类的关系 但是在调用的时候 却没有显示出我喜爱嗯要得结果,具体情况如下: at September 23, 2018

    没 save?

  • [闲聊] [吹水] 如果让你去面试 Ruby 的应聘者,你会问什么问题? at August 25, 2018

    你会啥绝活

  • 出 15 寸 17 款高配 Macbook Pro15 带 bar 带 Apple Care 年延保 at July 31, 2018

    跟我一款啊,原价 20000 多吧

  • 求书,Ruby 元编程第二版中文电子版,最好 PDF,不要扫描版,我愿意购买!!!!!!! at July 28, 2018

    这本书不就是小说吗😄给你讲了个故事,娓娓道来

  • 已知一个 gem, 如何搜索使用了这个 gem 的开源项目 at July 11, 2018

    哇塞!就是这种。感恩 :)

    我得反思下为什么我找不到、搜不出来。

  • 已知一个 gem, 如何搜索使用了这个 gem 的开源项目 at July 09, 2018

    这样能找到用了这个 gem 的 repo 吗?

  • 想系统的看一下 Rails 的源码,有什么好的阅读方式吗? at July 01, 2018

    大手们不是用 vim tags 来看各种 gem 的源码吗?

    最近试了几天 rubymine 感觉功能太多了。。

    sublime vim rubymine 纠结到底用哪个。。

  • 丢失的 Ruby 语言参考,英文版 at June 04, 2018

    确认过眼神后的 ruby 语言参考

  • Ruby 中 require,load,autoload,extend,include,prepend 的区别 at April 19, 2018

    关于 load 和 require 的补充

    Speaking of Namespaces (23), there is one interesting detail that involves Namespaces, constants, and Ruby’s load and require methods. Imagine finding a motd.rb file on the web that displays a “message of the day” on the console. You want to add this code to your latest program, so you load the file to execute it and display the message:

    load('motd.rb')

    Using load, however, has a side effect. The motd.rb file probably defines variables and classes. Although variables fall out of scope when the file has finished loading, constants don’t. As a result, motd.rb can pollute your program with the names of its own constants—in particular, class names.

    You can force motd.rb to keep its constants to itself by passing a second, optional argument to load:

    load('motd.rb', true)

    If you load a file this way, Ruby creates an anonymous module, uses that module as a Namespace to contain all the constants from motd.rb, and then destroys the module.

    The require method is quite similar to load, but it’s meant for a different purpose. You use load to execute code, and you use require to import libraries. That’s why require has no second argument: those leftover class names are probably the reason why you imported the file in the first place. Also, that’s why require tries only once to load each file, while load executes the file again every time you call it.

  • 不能发帖了? at April 18, 2018

    手机端怪怪的,不过配色感觉更时尚了哈哈

  • [Shanghai] 易空海 Ekohe Ruby on rails Developer position at March 29, 2018

    (what happens at Ekohe, stays at Ekohe)

  • PHP、Java、Python、Ruby 到底应该学哪一个? at March 27, 2018

    我就是想请教你能不能说的具体点,你认为的基础是什么,指针,oop? 我转行程序员,即使学 java 也一样会被说基础不好,跟语言有关吗?

  • PHP、Java、Python、Ruby 到底应该学哪一个? at March 27, 2018

    请问差在哪里呢?不知道 scope, 不知道 pass by reference/value这些概念的那种差?

  • 技术货: 讲讲 Ruby 中纯数据结构 ( Struct 与 OpenStruct ) at March 18, 2018

    https://www.jianshu.com/p/effd83b0eb91

  • 买的《Rails 5 敏捷开发》这本书中间莫名少了十几页,292 页后直接变成 309 页了。 at March 09, 2018

    恭喜你,这是珍藏版!

  • 是不是我学习的姿势不对?Rails 路由我总是理解不好 at March 06, 2018

    https://ruby-china.org/topics/34907这个帖子是我心病,一直没抽时间解决

  • 可以网络面试吗? at March 05, 2018

    谢谢,已加

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