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
|
def create
|
||||||
begin
|
begin
|
||||||
user = User.instantiate(params[:user])
|
user = User.instantiate!(params[:user])
|
||||||
rescue MongoMapper::DocumentNotValid => e
|
rescue MongoMapper::DocumentNotValid => e
|
||||||
user = nil
|
user = nil
|
||||||
flash[:error] = e.message
|
flash[:error] = e.message
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ class User
|
||||||
end
|
end
|
||||||
|
|
||||||
###Helpers############
|
###Helpers############
|
||||||
def self.instantiate( opts = {} )
|
def self.instantiate!( opts = {} )
|
||||||
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{opts[:url]}"
|
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{opts[:url]}"
|
||||||
opts[:person][:serialized_key] = generate_key
|
opts[:person][:serialized_key] = generate_key
|
||||||
User.create!(opts)
|
User.create!(opts)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue