PeterHamilton/citier — Issue #38: Save on root class creates new child model based on :type
Author: jonlhouse
Created: 2011-10-24 20:31:47+00:00
State: open

Hi,
Here's a feature request:

Quick version... I'd like to be able to create a new child model with:

```ruby
child = Parent.new( :type => 'Child', :child_specific_param => 'something', .... rest of params ...)
```

I could create multiple controllers or have one controller with a switch statement in the create action to instantiate different class objects based on the type parameter. However, I think it would be cleaners and DRYer to implement this functionality in the gem itself.

I have a forked version I'll play around with but I'm still new to the code so if someone else wants to have a go at it, kudos.

Thanks,
John