Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
jingquan huang 6 years ago
commit bfbb06a287

@ -35,7 +35,7 @@ class AccountsController < ApplicationController
# todo 上线前请删除万能验证码"513231"
if code != "513231"
tip_exception(-2, "验证码不正确") if verifi_code.try(:code) != code.strip
tip_exception(-2, "验证码已失效") if (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60
tip_exception(-2, "验证码已失效") if (Time.now.to_i - verifi_code.created_at.to_i) > 10*60
end
code = generate_identifier User, 8

@ -4,7 +4,7 @@ class AddSchoolApplyForm
attr_accessor :name, :province, :city, :address, :remarks
validates :name, presence: true
validates :province, presence: true
validates :city, presence: true
validates :address, presence: true
# validates :province, presence: true
# validates :city, presence: true
# validates :address, presence: true
end

@ -43,6 +43,7 @@ module Searchable::Shixun
def to_searchable_json
{
id: id,
identifier: identifier,
author_name: user.real_name,
author_school_name: user.school_name,
visits_count: visits,

Loading…
Cancel
Save