![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Rubyist
iteye_18611
这个作者很懒,什么都没留下…
展开
-
Array Functions
1. NEW tar = [1,2,3,4,5] arr = Array.new(4000){|i| 1+i } # better spell: arr = (1..4000).to_a # use tap tar = [].tap {|i| (1..3).to_a.each{|e| i << e}} 2.1 take # Returns first elem...原创 2014-07-13 21:40:56 · 74 阅读 · 0 评论 -
Devise 登陆验证
Devise 登陆验证的代码 https://github.com/plataformatec/devise/blob/v2.0.2/lib/devise/models/database_authenticatable.rb#L37 salt = self.encrypted_password[0..28] https://github.com/codahale/bcr...原创 2014-09-05 01:17:32 · 97 阅读 · 0 评论 -
rails ajax 执行remote js
简要姿势点 1.Controller::Action 写 respond_to do |format| format.js format.html format.xls end Rails会对应去render controller_name/action_name.js.erb controller_name/action_name.html.erb controller...原创 2014-09-16 22:58:14 · 149 阅读 · 0 评论