自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

Rails Caching Stores

粘贴至Rails API Caching stores All the caching stores from ActiveSupport::Cache are available to be used as backends for Action Controller caching. This setting only affects action and fragment cachi...

2012-06-28 23:54:34 101

rails2.3.2 ExceptionNotifier 配置

必须先在项目中要加入plugin   exception_notifier(附件就是)   然后 首先在development.rb文件中加入 ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :address => "smtp.a-it.jp", ...

2012-02-10 11:52:33 105

原创 rails3 使用 bootstrap

在你的rails3项目里面使用twitter's bootstrap 只需要安装一个gem包就ok了 快来试试吧!   gem 'less-rails-bootstrap' 相当简单,下载bootstrap可以到http://twitter.github.com/bootstrap/ 去下载   更多关于less-rails-bootstrap的资料可以看 http://opin...

2012-02-09 23:22:11 114

原创 rails 中 利用方法名达到传递参数的效果

如果你需要写很多batch方法,但是操作都是一样的,只是参数不一样而已,而你又不想传参数,就可以使用method_missing方法,rails中的find_by_方法就是利用这个来实现的。 def method_missing(sym, *args, &block) if sym == :add_datas_to_user add_datas('user') ...

2011-11-17 11:07:43 318

原创 ruby Array等对象深拷贝

浅拷贝: a = [1, 2, 3, 4] b = a a << 5 pp a, b #=> [1, 2, 3, 4, 5] #=> [1, 2, 3, 4, 5]   深拷贝:   a = [1, 2, 3, 4] b = a.dup a << 5 pp a, b #=> [1, 2, 3, 4, 5] ...

2011-10-26 11:40:11 565

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除