title: NameError - wrong constant name when creating user (Devise, Rails)
body: <p>I'm using Rails 5.0.5 with Devise 4.3.0 for authentication. This app has been running smoothly for months, until I added a 'type'=>'string' attribute to my User model and attempted to create a new user. Submitting the form gives me a 500 internal server error. In this example, the User.type = 'hunter'. </p>
  
  <pre><code> NameError - wrong constant name hunter:
  
   activesupport (5.0.5) lib/active_support/inflector/methods.rb:268:in `const_get'
    activesupport (5.0.5) lib/active_support/inflector/methods.rb:268:in `block in constantize'
    activesupport (5.0.5) lib/active_support/inflector/methods.rb:266:in `each'
    activesupport (5.0.5) lib/active_support/inflector/methods.rb:266:in `inject'
    activesupport (5.0.5) lib/active_support/inflector/methods.rb:266:in `constantize'
    activesupport (5.0.5) lib/active_support/dependencies.rb:583:in `get'
    activesupport (5.0.5) lib/active_support/dependencies.rb:614:in `constantize'
    activerecord (5.0.5) lib/active_record/inheritance.rb:177:in `find_sti_class'
    activerecord (5.0.5) lib/active_record/inheritance.rb:209:in `subclass_from_attributes'
    activerecord (5.0.5) lib/active_record/inheritance.rb:55:in `new'
    devise (4.3.0) lib/devise/models/registerable.rb:20:in `new_with_session'
    app/models/user.rb:58:in `new_with_session'
  </code></pre>
  
  <p>user.rb:</p>
  
  <pre><code>def self.new_with_session(params, session)
      if session['devise.user_attributes']
        new(session['devise.user_attributes']) do |user|
          user.attributes = params
          user.valid?
        end
      else
        super
      end
    end
  </code></pre>
  
  <p>Is Rails think this attribute value is a ClassName?? Can't seem to figure this one out. Any help greatly appreciated.</p>