# Re: Active Record save doesn't save! (more detail - is this

**URL:** <https://www.ruby-forum.com/t/re-active-record-save-doesnt-save-more-detail-is-this/94327>\
**Category:** Rails\
**Created:** [April 28, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/re-active-record-save-doesnt-save-more-detail-is-this/94327 "2006-04-28T22:09:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [April 28, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/re-active-record-save-doesnt-save-more-detail-is-this/94327/1 "2006-04-28T22:09:23Z")

</div>

I got it to work by changing

scheduled\_end\_date= nil  
to  
self.scheduled\_end\_date= nil.

I believe these statements should be equivilent.

I don’t know Ruby/Rails well enough to know when, if or why that should  
matter. Can someone educate me please? I want to believe this framework  
is  
ready for production work, but silently dropping data is a very big  
problem. I expect that I’ve done something wrong. I just want to know  
what.

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [April 29, 2006, 12:11am UTC](https://www.ruby-forum.com/t/re-active-record-save-doesnt-save-more-detail-is-this/94327/2 "2006-04-29T00:11:51Z")

</div>

Only a roob noob but just read the bit about self and scope in the  
excellent Ruby for Rails and I believe self.somemethod can be written as  
somemethod _except_ when followed by an assignment (i.e. equals sign).  
Ruby thinks somemethod= nil is assigning the value (in this case nil) to  
a local variable, somemethod.

Hope this helps

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [April 29, 2006, 2:07am UTC](https://www.ruby-forum.com/t/re-active-record-save-doesnt-save-more-detail-is-this/94327/3 "2006-04-29T02:07:16Z")

</div>

On 4/28/06, Chris T [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Only a roob noob but just read the bit about self and scope in the  
> excellent Ruby for Rails and I believe self.somemethod can be written as  
> somemethod _except_ when followed by an assignment (i.e. equals sign).  
> Ruby thinks somemethod= nil is assigning the value (in this case nil) to  
> a local variable, somemethod.
> 
> Hope this helps

I guess you’re right. The lack of a requirement to declare variables is  
hard  
to get used to, especially when I can only do Ruby part time.

Thanks. Time for a code review, I guess.  
I need to get that book, everybody says it rocks.
