# Rails 3 - the most annoying deprecation warning

**URL:** <https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067>\
**Category:** Rails\
**Created:** [August 29, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067 "2010-08-29T20:08:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 29, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067/1 "2010-08-29T20:08:13Z")

</div>

I just successfully converted my Rails 2.3.8 app to Rails 3.0 Release  
candidate 2! I will post both the apps on my github account for  
everyone else. I do want to clean up the deprecation warnings as best  
as I can before I post them though. By far the most frequent  
deprecation warning that shows up everywhere, i.e., the console log as  
well as command line window when I run tests/cucumber etc. is the  
following type:

DEPRECATION WARNING: save(false) is deprecated, please give  
save(:validate =\> false) instead. (called from save at  
/home/bruparel/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active\_record/validations.rb:43)

Thing is: it is all over the place. I am not even sure where to look  
and what to do. It seems like it has nothing to do with save and  
everything else. Can someone please explain?

Thanks.

Bharat

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 30, 2010, 1:42am UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067/2 "2010-08-30T01:42:15Z")

</div>

> DEPRECATION WARNING: save(false) is deprecated, please give  
> save(:validate =\> false) instead. (called from save at  
> /home/bruparel/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active\_record/validations.rb:43)

From the 2.3.8 Docs:

(ActiveRecord::Base)  
save(perform\_validation = true)  
Saves the model.

If the model is new a record gets created in the database, otherwise the  
existing record gets updated.

If perform\_validation is true validations run. If any of them fail the  
action is cancelled and save returns false. If the flag is false  
validations are bypassed altogether. See ActiveRecord::Validations for  
more information.

Thereâ€™s a series of callbacks associated with save. If any of the  
before\_\* callbacks return false the action is cancelled and save returns  
false. See ActiveRecord::Callbacks for further details

(ActiveRecord::Persistence)  
save(options)  
Saves the model.

If the model is new a record gets created in the database, otherwise the  
existing record gets updated.  
By default, save always run validations. If any of them fail the action  
is cancelled and save returns false. However, if you supply :validate =\>  
false, validations are bypassed altogether. See  
ActiveRecord::Validations for more information.

Thereâ€™s a series of callbacks associated with save. If any of the  
before\_\* callbacks return false the action is cancelled and save returns  
false. See ActiveRecord::Callbacks for further details.

* * *

They just made it all “hashier.” If save(false) isn’t something that  
you’re calling in your code it is likely in plugins or gems that you’re  
loading.

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 30, 2010, 1:43am UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067/3 "2010-08-30T01:43:06Z")

</div>

Parker S. wrote:

> (ActiveRecord::Persistence)  
> save(options)  
> Saves the model.
> 
> If the model is new a record gets created in the database, otherwise the  
> existing record gets updated.  
> By default, save always run validations. If any of them fail the action  
> is cancelled and save returns false. However, if you supply :validate =\>  
> false, validations are bypassed altogether. See  
> ActiveRecord::Validations for more information.
> 
> Thereâ€™s a series of callbacks associated with save. If any of the  
> before\_\* callbacks return false the action is cancelled and save returns  
> false. See ActiveRecord::Callbacks for further details.

That portion was from the Rails 3 docs, forgot to add that.

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 30, 2010, 2:50am UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067/4 "2010-08-30T02:50:40Z")

</div>

“If save(false) isn’t something that  
you’re calling in your code it is likely in plugins or gems that you’re  
loading.” —

Thank you for your time. This makes sense. However, there is not a  
single place in my application where I am calling save(false) and this  
warning is triggered all over the place WITHOUT a reference to the line  
of code (in the plugin/gem) that might be triggering it.

I have simply commented it out in the rails 3.0 code since in my  
judgement, it is more trouble than worth it?

What do you think?

Bharat

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [September 1, 2010, 3:26am UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067/5 "2010-09-01T03:26:44Z")

</div>

Bharat R. wrote:

> Thank you for your time. This makes sense. However, there is not a  
> single place in my application where I am calling save(false) and this  
> warning is triggered all over the place WITHOUT a reference to the line  
> of code (in the plugin/gem) that might be triggering it.
> 
> I have simply commented it out in the rails 3.0 code since in my  
> judgement, it is more trouble than worth it?
> 
> What do you think?
> 
> Bharat

The “head in the sand” approach isn’t usually a good one, but I can  
understand your frustration at all of the Deprecation warnings. If you  
aren’t using it then it is certainly a gem or plugin, and with Rails 3  
officially out they will be updated shortly. If they aren’t actively  
updated you should investigate another solution anyhow =)

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 30, 2010, 4:48am UTC](https://www.ruby-forum.com/t/rails-3-the-most-annoying-deprecation-warning/194067/6 "2010-08-30T04:48:19Z")

</div>

On Aug 29, 2010, at 8:50 PM, Bharat R. wrote:

> I have simply commented it out in the rails 3.0 code since in my  
> judgement, it is more trouble than worth it?
> 
> What do you think?
> 
> Bharat

If you’re using authlogic, then you might be seeing what I described  
in issue 161

> **[Issues · binarylogic/authlogic](https://github.com/binarylogic/authlogic/issues#issue/161)**
>
> A simple ruby authentication solution. Contribute to binarylogic/authlogic development by creating an account on GitHub.

-Rob

Rob B.  
removed\_email\_address@domain.invalid [http://AgileConsultingLLC.com/](http://AgileConsultingLLC.com/)  
removed\_email\_address@domain.invalid [http://GaslightSoftware.com/](http://GaslightSoftware.com/)
