Browse Source

before merge

tags/v1
qyzh 6 years ago
parent
commit
e07dddde98
3 changed files with 25 additions and 4 deletions
  1. +4
    -3
      app/controllers/application_controller.rb
  2. +1
    -1
      app/controllers/settings_controller.rb
  3. +20
    -0
      public/options/readme/readme

+ 4
- 3
app/controllers/application_controller.rb View File

@@ -342,7 +342,9 @@ class ApplicationController < ActionController::Base
elsif params[:debug] == 'student'
User.current = User.find 8686
elsif params[:debug] == 'admin'
User.current = User.find 1
user = User.find 1
User.current = user
cookies.signed[:user_id] = user.id
end
end
# User.current = User.find 81403
@@ -386,7 +388,6 @@ class ApplicationController < ActionController::Base
else
User.current
end
# User.current
end

## 默认输出json
@@ -794,4 +795,4 @@ class ApplicationController < ActionController::Base
HotSearchKeyword.add(keyword)
end

end
end

+ 1
- 1
app/controllers/settings_controller.rb View File

@@ -1,6 +1,6 @@
class SettingsController < ApplicationController
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?
end
end

+ 20
- 0
public/options/readme/readme View File

@@ -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…
Cancel
Save