|  |  | @ -56,9 +56,10 @@ module Mobile | 
			
		
	
		
		
			
				
					
					|  |  |  |             user = us.register ({:login=>openid, :mail=>"#{openid}@163.com", |  |  |  |             user = us.register ({:login=>openid, :mail=>"#{openid}@163.com", | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  :password=>"12345678", :password_confirmation=>"12345678", |  |  |  |                                  :password=>"12345678", :password_confirmation=>"12345678", | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  :should_confirmation_password => true}) |  |  |  |                                  :should_confirmation_password => true}) | 
			
		
	
		
		
			
				
					
					|  |  |  | 						user.update_attributes(:lastname=>name) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             raise user.errors.full_messages.first if user.new_record? |  |  |  |             raise user.errors.full_messages.first if user.new_record? | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             user.update_attributes(:lastname=>name) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             #自动激活 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             user = automatically_register(user) | 
			
		
	
		
		
			
				
					
					|  |  |  |             UserWechat.create!( |  |  |  |             UserWechat.create!( | 
			
		
	
		
		
			
				
					
					|  |  |  |                 openid: openid, |  |  |  |                 openid: openid, | 
			
		
	
		
		
			
				
					
					|  |  |  |                 user: user, |  |  |  |                 user: user, | 
			
		
	
	
		
		
			
				
					|  |  | 
 |