pokonski/public_activity — pull request #78 by wulab (2013-02-20 17:28:55+00:00)
Title: Prevent #prepare_settings from changing global custom fields

This pull request fixes a bug where global custom fields get changed when calling `#activity` with custom fields and save it to create activity.

```irb
>> Article.activity_custom_fields_global
=> {:nonstandard => 'global'}
>> art = Article.new
>> art.activity :nonstandard => 'instance'
>> art.save
>> Article.activity_custom_fields_global
=> {:nonstandard => 'instance'}
```

That is because in `#prepare_settings`, instance custom fields are merged to local variable that references global custom fields without cloning it first.