This project is archived and is in readonly mode.
NoMethodError when using 'class_attribute'
-
Neeraj Singh
How is your project setup? Can you elaborate on that. Thanks.
-
Chris Sepic
Neeraj - I'm just requiring the latest activesupport (activesupport-3.0.0.beta4) in irb:
irb(main):001:0> gem "activesupport", "3.0.0.beta4" => true irb(main):002:0> require "active_support/core_ext" => true irb(main):003:0> class Foo; class_attribute :bar; end NoMethodError: undefined method `class_attribute' for Foo:Class from (irb):3:in `<class:Foo>' from (irb):3 from /Users/csepic/.rvm/rubies/ruby-1.9.1-p378/bin/irb:15:in `<main>' irb(main):004:0> -
Chris Sepic
Looking in class.rb, there is simply no "require" for attribute.rb. I don't know if there is a reason for this.
-
Prem Sichanugrist (sikachu)
- State changed from new to verified
- Assigned user set to Yehuda Katz (wycats)
You're definitely right, here is the patch for it.
-
Prem Sichanugrist (sikachu)
- State changed from verified to resolved
- Importance changed from to Low
This ticket was resolved a while ago, but seems like José forgot to add # in commit message!
http://github.com/rails/rails/commit/6c4bab306ae1ee47b7fe5933867d32...
