l4u/mongoid_denormalize — pull request #2 by hubsmoke (2012-03-01 06:53:56+00:00)
Title: Pass-thru custom options specified in 'denormalize', roll up logandk's changes

When working with other mongoid libraries, it is sometimes necessary or convenient to specify custom options for the `field` class method. These options are specified in a Hash, as you know. Mongoid_denormalize generates `field` class methods from the custom `denormalize` class method, but does not pass through custom options specified in the `denormalize` class method. This makes it cumbersome or impossible to use certain mongoid libraries such as mongoid_spacial.

For example, if I want to be able to use mongoid_spacial's query interface on a field in a class, I can do the following:

```field :loc, :type => Array, :spacial => true```

However, if I'm using mongoid_denormalize and want to use mongoid_spacial on a denormalized field, I'd have to do the following:

```denormalize :loc, :type => Array, :from => :other_class, :spacial => true```

Currently, this is not possible, but I have provided a fix which allows these options to be passed through, allowing the above case to work. I've also provided a test for this new feature.