Joshua Partogi wrote:
> Hi all,
> 
> Coming from the Java & Hibernate world, I was confused when trying out
> this piece of line of code:
> class Task < ActiveRecord::Base
>   def status=(status)
>     status = 'P'
>     write_attribute(:status, status)
>   end
> 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?

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to