change the name of instantiate back
This commit is contained in:
parent
d2f5d3c4c1
commit
02dda4f0a7
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue