Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 new_record? deprecated

I have a Rails 3 app and I am planning to use the ActiveRecord method new_record? on my shared form to show the user either a Create or Update button. I looked at APIDock and for this method and it says

Method Deprecated: This method is deprecated on the latest stable version of Rails. The last existing version (v2.3.8) is shown here.

What exactly does that mean? Does it mean that it will no longer be available moving forward?

like image 878
Jhony Fung Avatar asked Mar 27 '11 19:03

Jhony Fung


1 Answers

ActiveRecord::Persistence makes no mention of deprecation... I believe APIDock is simply fooled by the restructuring of the classes. If the method were deprecated, rails would generate a warning when it was used.

see: http://apidock.com/rails/ActiveRecord/Persistence/new_record%3F

like image 111
20man Avatar answered Oct 28 '22 00:10

20man