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

dev_forum
cxt 5 years ago
commit 6702185011

@ -3,6 +3,12 @@ class UsersController < ApplicationController
before_action :load_user, only: [:show, :homepage_info]
before_action :check_user_exist, only: [:show, :homepage_info]
# 检查是否更新
def system_update
@notice = SystemUpdateNotice.last
end
def show;end
def update

@ -0,0 +1,2 @@
class SystemUpdateNotice < ApplicationRecord
end

@ -0,0 +1,6 @@
if @notice && @notice.end_time > Time.now
json.system_update true
json.(@notice, :subject, :notes, :start_time, :end_time)
else
json.system_update false
end

@ -64,6 +64,7 @@ Rails.application.routes.draw do
get :search_user_projects
post :brief_introduction
post :attendance
get :system_update
resource :trial_apply, only: [:create]
resources :projects, only: [] do

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe SystemUpdateNotice, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
Loading…
Cancel
Save