[Rails] Newbie: I just want to exclude two attributes when I call update_attributes
I have two virtual attributes in my model. Let's call them "hours_worked" and "minutes_worked".
I use them to calculate "work_time", which is an integer I store -- it's the total minutes worked (e.g. 3.5 hours is 210).
I want :hours_worked and :minutes_worked to NEVER appear in the database.
But when @foo.update_attributes(params[:foo]) is called, it bombs.
Any help would be appreciated. Thirty years software development experience and I just can't seem to pick up Rails. ARGH!!!
-- 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/HS4bF1ZeZZ0J.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home