This works, but gives me all project_params. Any idea how I only pass in what params have changed?
@project.create_activity :update, owner: current_user, params: project_params
--
You received this message because you are subscribed to the Google Groups "Public Activity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to public-activi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def track_changing_attributes tracking_attributes = %w(name description estimated_time state).to_set if changed.to_set.intersect?(tracking_attributes) changed_scope_attribute = changes.select { |key, _| tracking_attributes.include? key } create_activity( action: 'update', parameters: {attributes: changed_scope_attribute}, owner: lambda { |controller, _| controller.current_user } ) endend