change the name of instantiate back

This commit is contained in:
Raphael 2010-09-15 17:08:56 -07:00
parent d2f5d3c4c1
commit 02dda4f0a7
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class RegistrationsController < Devise::RegistrationsController
def create
begin
user = User.instantiate(params[:user])
user = User.instantiate!(params[:user])
rescue MongoMapper::DocumentNotValid => e
user = nil
flash[:error] = e.message

View file

@ -286,7 +286,7 @@ class User
end
###Helpers############
def self.instantiate( opts = {} )
def self.instantiate!( opts = {} )
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{opts[:url]}"
opts[:person][:serialized_key] = generate_key
User.create!(opts)