<commit_before>Create New for Rails
=======================

This Rails plugin makes a `create_new` method available in `ApplicationController` which

* takes the name of an ActiveRecord model and
* sets an appropriately named instance variable in the controller
* with a new instance of the model
* initialized with the attributes in `params` corresponding to the model name.

Full documentation is at [RubyDoc.info](http://rubydoc.info/gems/create-new).

Example
-------

The following

    class UserController < ApplicationController
      def create
        create_new(:user)
      end
    end

is the equivalent of

    class UserController < ApplicationController
      def create
        @user = User.new(params[:user])
      end
    end

Colophon
--------

### See also

If you like this gem, you may also want to check out [Declarative Find](http://codyrobbins.com/software/declarative-find), [Save Changes To](http://codyrobbins.com/software/save-changes-to), and  [HTTP Error](http://codyrobbins.com/software/http-error).

### Tested with

* Rails 3.0.5 — 20 May 2011

### Contributing

* [Source](https://github.com/codyrobbins/create-new)
* [Bug reports](https://github.com/codyrobbins/create-new/issues)

To send patches, please fork on GitHub and submit a pull request.

### Credits

© 2011 [<NAME>](http://codyrobbins.com/). See LICENSE for details.

* [Homepage](http://codyrobbins.com/software/create-new)
* [My other gems](https://rubygems.org/profiles/50409)
* [Follow me on Twitter](http://twitter.com/codyrobbins)<commit_msg>Updated the link to my other gems.<commit_after>Create New for Rails
=======================

This Rails plugin makes a `create_new` method available in `ApplicationController` which

* takes the name of an ActiveRecord model and
* sets an appropriately named instance variable in the controller
* with a new instance of the model
* initialized with the attributes in `params` corresponding to the model name.

Full documentation is at [RubyDoc.info](http://rubydoc.info/gems/create-new).

Example
-------

The following

    class UserController < ApplicationController
      def create
        create_new(:user)
      end
    end

is the equivalent of

    class UserController < ApplicationController
      def create
        @user = User.new(params[:user])
      end
    end

Colophon
--------

### See also

If you like this gem, you may also want to check out [Declarative Find](http://codyrobbins.com/software/declarative-find), [Save Changes To](http://codyrobbins.com/software/save-changes-to), and  [HTTP Error](http://codyrobbins.com/software/http-error).

### Tested with

* Rails 3.0.5 — 20 May 2011

### Contributing

* [Source](https://github.com/codyrobbins/create-new)
* [Bug reports](https://github.com/codyrobbins/create-new/issues)

To send patches, please fork on GitHub and submit a pull request.

### Credits

© 2011 [<NAME>](http://codyrobbins.com/). See LICENSE for details.

* [Homepage](http://codyrobbins.com/software/create-new)
* [My other gems](http://codyrobbins.com/software#gems)
* [Follow me on Twitter](http://twitter.com/codyrobbins)
{'fraction_non_alphanumeric': 0.13245670301475304, 'fraction_numerical': 0.009942270686337396, 'mean_word_length': 3.835658914728682, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1148527', 'n_tokens_mistral': 985, 'n_tokens_neox': 915, 'n_words': 289}