Warning of "class_inheritable_attribute is deprecated" #8

Closed
aegoose opened this Issue Dec 18, 2011 · 9 comments

Comments

Projects
None yet
8 participants

aegoose commented Dec 18, 2011

Hi,

I have upgraded rails 3.0 to rails 3.1.
When I use userstamp (gem "userstamp", "~> 2.0.1"), when use rails console, rails server, rake, etc, the deprecated warning emerged:


DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /home/simon/rorworkspace/rails310/railsdemo/config/application.rb:13)

When I discarded userstamp gem in Gemfile, the warning disappeared.

Everything works OK with the warning message, but it confuse me every time.

Is any new version have fixed this warning?

Owner

delynn commented Dec 21, 2011

I have been meaning to write a new version of this plugin to make it compatible with Rails 3, but just haven't had time to do that yet. I hope to get some time in the next month to work on this though, and these deprecation warnings will be removed with the new version.

Hi,

Let me know if you need a hand. I just tried updating to Rails 3.2 and the plugin no longer works at all. It's a great plugin and it would be very easy to patch for Rails 3.1/3.2 until you come up with a new one.

Thanks,
Craig

I think andreacfm's pull request fixed this for me. I've also spotted an additional problem which occurs when this plugin is used for a migration. I can make a pull request with that fix next week.

Owner

delynn commented Jan 25, 2012

Merged pull request from @saevarom that includes code from @andreacfm. Hopefully the issue is now resolved.

delynn closed this Jan 25, 2012

Contributor

andreacfm commented Jan 25, 2012

@delynn
did you already pushed new version to rubygems?

Owner

delynn commented Jan 25, 2012

I'm working on making that happen actually. I needed to get push permission from Michael Grosser. I'm doing a diff between his 2.0.1 and this code base, and will be releasing a 2.1.0 later today.

joost commented Jul 11, 2012

The Rubygems version still seems to be at 2.0.1 (https://rubygems.org/gems/userstamp). Has it been updated or should I use the github version?

So what happened @delynn? Why did you not release 2.1.0? I am still getting this deprication warning in my Rails 3.1.1 app even when using the github version.

GerryG commented Aug 8, 2012

Is this patch released? I submitted a patch months ago, it was closed saying it was added, but I don't see it in any published gem release.

If it is released, what version is it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment