- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 basic use of sidekiq (2)
vim Gemfile source "https://rubygems.org" gem "sidekiq"gem 'rack-protection' gem "sinatra" vim config.ru require 'sidekiq' require 'rack-protection' Sidekiq.configure_client
2016-12-22 17:16:33 386
原创 RubyOnRails local_assigns
http://api.rubyonrails.org/classes/ActionView/Template.html#method-i-local_assigns Returns a hash with the defined local variables. Given this sub template rendering: You can use local_assig
2016-12-21 13:17:59 464
原创 Rails Array method second/third/second_to_last
http://api.rubyonrails.org/classes/Array.html#method-i-second [27] pry(main)> list = ["a", "b", "c", "d"] => ["a", "b", "c", "d"] [28] pry(main)> list.first => "a" [29] pry(main)> list.second =
2016-12-21 11:41:31 360
原创 Rails sanitize
The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. These helper methods extend Action View making them callable within your template files. san
2016-12-14 17:18:05 762
原创 简化查询
def search @videos = Video.where("videoid LIKE ? or title LIKE ?", "%#{params[:q]}%", "%#{params[:q]}%") render :index end 使用hash的写法 def search @videos = Video.where("videoid L
2016-12-12 13:09:16 405
原创 修改git remote url
$ ssh -v wangz@gitlab.alibaxx-inc.com $ git remote ali set-url git@gitlab.alibaxx-inc.com:youk-aaa/xxx.git
2016-12-06 15:40:10 1978
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人