jnunemaker/mongomapper — pull request #385 by bearded (2012-02-09 12:02:24+00:00)
Title: Added option --parent into generator

Hello,

This PR adds **--parent** option into generator and returns back Rails 3.0 support

Please pull

```console
$ rails generate model Contact hide:boolean
invoke mongo_mapper
(erb):1:in `template': undefined method `module_namespacing' for # (NoMethodError)

```

```console
$ rails generate model Contact hide:boolean
invoke mongo_mapper
create app/models/contact.rb
invoke test_unit
create test/unit/contact_test.rb
create test/fixtures/contacts.yml

$ rails generate model Person name:string --parent Contact
invoke mongo_mapper
create app/models/person.rb
invoke test_unit
create test/unit/person_test.rb
create test/fixtures/people.yml
```

```ruby
class Contact
include MongoMapper::Document

key :hide, Boolean

end

class Person < Contact

key :name, String

end
```