-
55 个赞 • 102 条回复
-
2 个赞 • 4 条回复
-
1 个赞 • 1 条回复
-
0 个赞 • 2 条回复
-
0 个赞 • 9 条回复
-
0 个赞 • 13 条回复
-
0 个赞 • 6 条回复
-
你这个里面的 id 并不是嵌套表单里面的 id,取到数据的时候自然找不到原有的数据去 update,所以每次都是进行 insert 操作
-
怎么让 请求某个 action 的日志不产生在 log 文件里 at 2019年01月18日
# https://stackoverflow.com/questions/2196828/how-can-i-disable-logging-in-ruby-on-rails-on-a-per-action-basis def action Rails.logger.silence do # Things within this block will not be logged... end end
-
实例变量的一个坑 at 2018年12月17日
应该是相当于
class C def self.f @c end end
-
Awesome Ruby China at 2018年08月20日
@Rei 麻烦管理员帮忙删一下吧
-
在调用 selenium-webdriver 库时发现报如下错误,找了好久资料不知道问题出在那里,有大神知道的吗 at 2018年06月28日
Failed to open TCP connection to 127.0.0.1:5555
是不是啥服务没开 -
undefined method `reopen' for "streamed":String at 2018年06月22日
那你可能需要把
# frozen_string_literal: true
改成 false -
undefined method `reopen' for "streamed":String at 2018年06月22日
你的文件开头是不是写了
# frozen_string_literal: true
-
extract_options! 实现的疑问 at 2018年06月18日
看到这个 commit,在回头看
extractable_options?
上方的注释,其实就是为了可以自定义子类,就像你例子中的H,如果class H < Hash def extractable_options? false end end
那么
hash = H.new({foo: 1}) array = [hash] options = array.extract_options! # 这边是取不出 hash 的
-
Awesome Ruby China at 2018年06月12日
杭州的一个学校,主要是学长很有想法和能力;工具的话叫做 trello
-
Awesome Ruby China at 2018年06月01日
请问你最后的图每次合并分支都是通过 rebase 吗?能分享下你们是按照怎么样的流程走的呢?