On Oct 13, 2:24 am, Marnen Laibow-Koser
<rails-mailing-l...@andreas-s.net> wrote:
> Then you want something like
>
> def status=(value)
>   new_value = do_something_to(value)
>   self[:status] = new_value # assuming this class is derived from AR
> end
>
> The reason your attempt to do status = value didn't work is that it was
> just calling the same method.


Aaaah. Or course! You can omit the parantheses in ruby method call.
Thanks heaps for pointing me this out.

Kind regards,

-- 
Certified Scrum Master
http://blog.scrum8.com | http://jobs.scrum8.com | http://twitter.com/scrum8

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to