# Re: Overwriting default accessors

**URL:** <https://www.ruby-forum.com/t/re-overwriting-default-accessors/177125>\
**Category:** Rails\
**Created:** [October 12, 2009, 5:52am UTC](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177125 "2009-10-12T05:52:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![builtbysimple](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/aca169/32.png) [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Post date:** [October 12, 2009, 5:52am UTC](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177125/1 "2009-10-12T05:52:37Z")

</div>

On Oct 12, 10:31 am, Marnen Laibow-Koser  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > end
> 
> This won’t quite work. But before I try to improve it…what are you  
> trying to do? Set status to P no matter the argument that the function  
> is called with?

Well there are more logic there actually to set the status. I was  
hoping that this accessors would be able to set or change the value of  
:status. But the behaviours doesn’t seems to be like that. So what is  
this accessors used for? Is it only for the view level?

Regards,

–  
Certified Scrum Master  
[http://blog.scrum8.com](http://blog.scrum8.com) | [http://jobs.scrum8.com](http://jobs.scrum8.com) |  
[http://twitter.com/scrum8](http://twitter.com/scrum8)

---

<div class="post-metadata">

**Author:** ![builtbysimple](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/aca169/32.png) [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Post date:** [October 12, 2009, 6:04am UTC](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177125/2 "2009-10-12T06:04:03Z")

</div>

Joshua P. wrote:

> On Oct 12, 10:31 am, Marnen Laibow-Koser  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > > end
> > 
> > This won’t quite work. But before I try to improve it…what are you  
> > trying to do? Set status to P no matter the argument that the function  
> > is called with?
> 
> Well there are more logic there actually to set the status. I was  
> hoping that this accessors would be able to set or change the value of  
> :status. But the behaviours doesn’t seems to be like that.

It can be, but you’ll have to do it slightly differently. I’ll help  
you, but you’re going to have to explain exactly what you want to have  
happen.

> So what is  
> this accessors used for? Is it only for the view level?

No. It’s just that your syntax wasn’t quite correct.

> Regards,
> 
> –  
> Certified Scrum Master  
> [http://blog.scrum8.com](http://blog.scrum8.com) | [http://jobs.scrum8.com](http://jobs.scrum8.com) |  
> [http://twitter.com/scrum8](http://twitter.com/scrum8)

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
