是不是类似自己造轮子的意思
Hooray
谢谢你,我看明白啦!
顺着你的思路我想能不能把 ajax 伪装成一个普通的请求。。查了下好像不行
十分感谢🙏解释的真清晰!
神说这个帖子要上代码,于是便有了代码
你说得对,我这里就是想表达跳转的 index 页面。项目里不是这么写的
能重新看一遍帖子吗兄得,我 google 解决了那个找不到路由的问题了。我的帖子问的是另外一个问题
hmm, 没太明白的你意思,有相关文章推荐下吗?
确实是 route 到 destroy action 了,只是在 destroy action 中 redirect_to :index 时出现的问题
谢谢,我也看到重新定向那块了,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
游猴有下载助手啊
没 save?
你会啥绝活
跟我一款啊,原价 20000 多吧
这本书不就是小说吗😄给你讲了个故事,娓娓道来
哇塞!就是这种。感恩 :)
我得反思下为什么我找不到、搜不出来。
这样能找到用了这个 gem 的 repo 吗?
大手们不是用 vim tags 来看各种 gem 的源码吗?
最近试了几天 rubymine 感觉功能太多了。。
sublime vim rubymine 纠结到底用哪个。。
确认过眼神后的 ruby 语言参考
关于 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.
手机端怪怪的,不过配色感觉更时尚了哈哈
(what happens at Ekohe, stays at Ekohe)
我就是想请教你能不能说的具体点,你认为的基础是什么,指针,oop? 我转行程序员,即使学 java 也一样会被说基础不好,跟语言有关吗?
请问差在哪里呢?不知道 scope, 不知道 pass by reference/value这些概念的那种差?
恭喜你,这是珍藏版!
https://ruby-china.org/topics/34907这个帖子是我心病,一直没抽时间解决
谢谢,已加