make sign up works

This commit is contained in:
2015-08-19 23:41:59 +08:00
parent 0fe8973037
commit 086a7cb862
2 changed files with 10 additions and 9 deletions
@@ -1,5 +1,6 @@
class Api::V1::RegistrationsController < ApplicationController
skip_before_action :verify_authenticity_token
class Api::V1::RegistrationsController < Api::V1::ApplicationController
skip_before_action :authenticate_user_from_token
respond_to :json
def create
+7 -7
View File
@@ -21,6 +21,13 @@ class User < ActiveRecord::Base
User.where(id: user_ids)
end
def active_auth_token
if auth_tokens.empty?
generate_auth_key
end
auth_tokens.first.value
end
private
def set_name
@@ -38,13 +45,6 @@ class User < ActiveRecord::Base
AuthToken.generate_token_for self
end
def active_auth_token
if auth_tokens.empty?
generate_auth_key
end
auth_tokens.first.value
end
end