diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-16 11:19:11 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-16 11:31:34 -0400 |
commit | 673372152032a886ba9196c69348386834590eab (patch) | |
tree | 4c2b85f05c084d91e916091924f510593bda87c9 /activesupport/lib | |
parent | 40fa51123d47053da9b5ed7d38ba7c1b6432a651 (diff) | |
download | rails-673372152032a886ba9196c69348386834590eab.tar.gz rails-673372152032a886ba9196c69348386834590eab.tar.bz2 rails-673372152032a886ba9196c69348386834590eab.zip |
Deprecate attr_accessor_with_default.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb b/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb index e3259a0a84..984f6fb957 100644 --- a/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +++ b/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb @@ -19,6 +19,7 @@ class Module # attr_accessor_with_default(:element_name) { name.underscore } # def attr_accessor_with_default(sym, default = Proc.new) + ActiveSupport::Deprecation.warn "attr_accessor_with_default is deprecated. Use Ruby instead!" define_method(sym, block_given? ? default : Proc.new { default }) module_eval(<<-EVAL, __FILE__, __LINE__ + 1) def #{sym}=(value) # def age=(value) |