Description:
add ip to front page, also fix seeds.rb
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r783:f1343ca4b141 - - 3 files changed: 3 inserted, 1 deleted
@@ -21,6 +21,7 | |||||
|
21 | saved_notice = flash[:notice] |
|
21 | saved_notice = flash[:notice] |
|
22 | reset_session |
|
22 | reset_session |
|
23 | flash.now[:notice] = saved_notice |
|
23 | flash.now[:notice] = saved_notice |
|
|
24 | + @remote_ip = request.remote_ip | ||
|
24 |
|
25 | ||
|
25 | # EXPERIMENT: |
|
26 | # EXPERIMENT: |
|
26 | # Hide login if in single user mode and the url does not |
|
27 | # Hide login if in single user mode and the url does not |
@@ -9,3 +9,4 | |||||
|
9 | = render :partial => 'announcement', :collection => @announcements |
|
9 | = render :partial => 'announcement', :collection => @announcements |
|
10 | .col-md-4{style: "padding-left: 20px;"} |
|
10 | .col-md-4{style: "padding-left: 20px;"} |
|
11 | = render :partial => 'login_box' |
|
11 | = render :partial => 'login_box' |
|
|
12 | + = "current ip is #{@remote_ip}" |
@@ -274,7 +274,7 | |||||
|
274 | end |
|
274 | end |
|
275 |
|
275 | ||
|
276 | def seed_more_languages |
|
276 | def seed_more_languages |
|
277 | - Language.delete_all |
|
277 | + #Language.delete_all |
|
278 | Language.find_or_create_by( name: 'c', pretty_name: 'C', ext: 'c', common_ext: 'c' ) |
|
278 | Language.find_or_create_by( name: 'c', pretty_name: 'C', ext: 'c', common_ext: 'c' ) |
|
279 | Language.find_or_create_by( name: 'cpp', pretty_name: 'C++', ext: 'cpp', common_ext: 'cpp,cc' ) |
|
279 | Language.find_or_create_by( name: 'cpp', pretty_name: 'C++', ext: 'cpp', common_ext: 'cpp,cc' ) |
|
280 | Language.find_or_create_by( name: 'pas', pretty_name: 'Pascal', ext: 'pas', common_ext: 'pas' ) |
|
280 | Language.find_or_create_by( name: 'pas', pretty_name: 'Pascal', ext: 'pas', common_ext: 'pas' ) |
You need to be logged in to leave comments.
Login now