before merge
This commit is contained in:
parent
a8c7fdb169
commit
e07dddde98
|
@ -342,7 +342,9 @@ class ApplicationController < ActionController::Base
|
||||||
elsif params[:debug] == 'student'
|
elsif params[:debug] == 'student'
|
||||||
User.current = User.find 8686
|
User.current = User.find 8686
|
||||||
elsif params[:debug] == 'admin'
|
elsif params[:debug] == 'admin'
|
||||||
User.current = User.find 1
|
user = User.find 1
|
||||||
|
User.current = user
|
||||||
|
cookies.signed[:user_id] = user.id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# User.current = User.find 81403
|
# User.current = User.find 81403
|
||||||
|
@ -386,7 +388,6 @@ class ApplicationController < ActionController::Base
|
||||||
else
|
else
|
||||||
User.current
|
User.current
|
||||||
end
|
end
|
||||||
# User.current
|
|
||||||
end
|
end
|
||||||
|
|
||||||
## 默认输出json
|
## 默认输出json
|
||||||
|
@ -794,4 +795,4 @@ class ApplicationController < ActionController::Base
|
||||||
HotSearchKeyword.add(keyword)
|
HotSearchKeyword.add(keyword)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -1,6 +1,6 @@
|
||||||
class SettingsController < ApplicationController
|
class SettingsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
@old_projects_url = nil
|
@old_projects_url = nil
|
||||||
@old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if User.current.logged?
|
@old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if User.current.logged?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
## 从命令行创建一个新的仓库
|
||||||
|
|
||||||
|
```bash
|
||||||
|
touch README.md
|
||||||
|
git init
|
||||||
|
git add README.md
|
||||||
|
git commit -m "first commit"
|
||||||
|
git remote add origin http://gitea.trustie.net/qiubing/gitea_binary_package.git
|
||||||
|
git push -u origin master
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## 从命令行推送已经创建的仓库
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git remote add origin http://gitea.trustie.net/qiubing/gitea_binary_package.git
|
||||||
|
git push -u origin master
|
||||||
|
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue