Hi.

I have an AR model named Order, and a field in the DB named expired. I
dont want this field to be modified from outside the model.

Therefore I have declared a private method expired=(value) in my Order
model.

This works fine in development and production; If I call o.expired =
nil I get a "NoMethodError: Attempt to call private method", and if I
use o.update_attributes(expired => nil) I get
"ActiveRecord::UnknownAttributeError: unknown attribute: expired".

However in test environment donot get such exceptions. I can easily
use my private methods in my test environment, which is not what I expected.

Any ideas?

Jarl


-- 
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-t...@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