diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -21,6 +21,7 @@ saved_notice = flash[:notice] reset_session flash.now[:notice] = saved_notice + @remote_ip = request.remote_ip # EXPERIMENT: # Hide login if in single user mode and the url does not diff --git a/app/views/main/login.html.haml b/app/views/main/login.html.haml --- a/app/views/main/login.html.haml +++ b/app/views/main/login.html.haml @@ -9,3 +9,4 @@ = render :partial => 'announcement', :collection => @announcements .col-md-4{style: "padding-left: 20px;"} = render :partial => 'login_box' + = "current ip is #{@remote_ip}" diff --git a/db/seeds.rb b/db/seeds.rb --- a/db/seeds.rb +++ b/db/seeds.rb @@ -274,7 +274,7 @@ end def seed_more_languages - Language.delete_all + #Language.delete_all Language.find_or_create_by( name: 'c', pretty_name: 'C', ext: 'c', common_ext: 'c' ) Language.find_or_create_by( name: 'cpp', pretty_name: 'C++', ext: 'cpp', common_ext: 'cpp,cc' ) Language.find_or_create_by( name: 'pas', pretty_name: 'Pascal', ext: 'pas', common_ext: 'pas' )