Create a log of changes to an attribute


#1

Hi There,

I’ve got an Opportunity model that includes an order_value attribute.
I’d like any changes to an opportunity’s order_value to be be reflected
as a new timestamped record in an order_value_entries table that
references opportunity_id.

I thought an Observer might be the right approach, but I’m not having
luck with the sytax.

Did I mention I’m just getting started in Rails?

Thanks in advance.


#2

I’ve got an Opportunity model that includes an order_value attribute.
I’d like any changes to an opportunity’s order_value to be be reflected
as a new timestamped record in an order_value_entries table that
references opportunity_id.

Never used it, but sounds like the acts_as_versioned pluging might be
what
you’re looking for…

http://www.agilewebdevelopment.com/plugins/acts_as_versioned


#3

Philip H. wrote:

I’ve got an Opportunity model that includes an order_value attribute.
I’d like any changes to an opportunity’s order_value to be be reflected
as a new timestamped record in an order_value_entries table that
references opportunity_id.

Never used it, but sounds like the acts_as_versioned pluging might be what
you’re looking for…

http://www.agilewebdevelopment.com/plugins/acts_as_versioned

Thanks Philip - I’ll take a look and let you know how it works.