Description:
add submission view loggin
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r529:32578781bde7 - - 3 files changed: 8 inserted, 2 deleted

@@ -0,0 +1,5
1 + class AddLastIpToUser < ActiveRecord::Migration
2 + def change
3 + add_column :users, :last_ip, :string
4 + end
5 + end
@@ -86,7 +86,7
86 @formatted_code = formatter.format(lexer.lex(@submission.source))
86 @formatted_code = formatter.format(lexer.lex(@submission.source))
87 @css_style = Rouge::Themes::ThankfulEyes.render(scope: '.highlight')
87 @css_style = Rouge::Themes::ThankfulEyes.render(scope: '.highlight')
88
88
89 - SubmissionLogView.create(user_id: user.id,submission_id: @submission.id)
89 + SubmissionViewLogs.create(user_id: session[:user_id],submission_id: @submission.id)
90
90
91 end
91 end
92
92
@@ -11,7 +11,7
11 #
11 #
12 # It's strongly recommended to check this file into your version control system.
12 # It's strongly recommended to check this file into your version control system.
13
13
14 - ActiveRecord::Schema.define(:version => 20150827131927) do
14 + ActiveRecord::Schema.define(:version => 20150827133841) do
15
15
16 create_table "announcements", :force => true do |t|
16 create_table "announcements", :force => true do |t|
17 t.string "author"
17 t.string "author"
@@ -249,6 +249,7
249 t.string "section"
249 t.string "section"
250 t.boolean "enabled", :default => true
250 t.boolean "enabled", :default => true
251 t.string "remark"
251 t.string "remark"
252 + t.string "last_ip"
252 end
253 end
253
254
254 add_index "users", ["login"], :name => "index_users_on_login", :unique => true
255 add_index "users", ["login"], :name => "index_users_on_login", :unique => true
You need to be logged in to leave comments. Login now