zendesk/property_sets — pull request #33 by craiglittle (2013-11-28 01:01:07+00:00)
Title: Allow the owner class to be customizable

I find myself in a situation where I need to open up the `account_settings` property set to define a key/value pair, like so:

```ruby
module Example
class Account

property_set :settings do
property :foobar, :type => :boolean, :default => true
end

end
end
```

Because of the way `property_sets` works now, the `property_set` invocation attempts to infer the name of the AR class to be created from the call site, consequently defining the `Example::AccountSettings` constant. However, we need to access the table associated with simply `AccountSettings`.

This patch lets the `property_set` method accept an optional `owner_class_name` argument to be used in combination with the set name to refer to the AR class and table name.

See the added test for an example of how this would work.

### Why is this needed?

There are times when a AR class, such as `Account`, might not be defined. In those cases, we still need a way to work with property sets associated with those classes.

@kbuckler @morten @staugaard @grosser