当前位置: 代码迷 >> Web前端 >> How do I use ActiveSupport core extensions
  详细解决方案

How do I use ActiveSupport core extensions

热度:626   发布时间:2012-09-09 09:27:54.0
How do I use ActiveSupport core extensions?

When I try to use 1.week.ago I get

NoMethodError: undefined method 'week' for 1:Fixnum from (irb):2

?

Read How to Load Core Extensions .

?

You can :
require 'active_support/core_ext'
or :
require 'active_support/all'

?

?

  相关解决方案