Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :null_session, except: :api

def must_be_admin
(current_user.admin?) ? () : (raise RoleForbiddenError)
raise RoleForbiddenError if current_user.admin?
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_nav.slim
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ nav.navbar.navbar-fixed-top.headroom.tk#global_nav role="navigation"
== fa_icon 'sign-up'
| 注册
li.hidden-xs
a data-toggle="modal" data-target="#sign_in_modal" role="button"
a data-toggle="modal" data-target="#sign_in_modal" role="button" href=""
== fa_icon 'sign_in'
| 登录
li.dropdown.only-xs
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/redis-object.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Redis.current = Redis.new(:host => '127.0.0.1', :port => 6379)
$redis = Redis.current = Redis.new(:host => '127.0.0.1', :port => 6379)