diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 913013442..a0377e4e4 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -164,7 +164,7 @@ class ShixunsController < ApplicationController @new_shixun = Shixun.new @new_shixun.attributes = @shixun.attributes.dup.except("id","user_id","visits","gpid","status", "identifier", "averge_star", "homepage_show","repo_name", "myshixuns_count", "challenges_count", - "can_copy") + "can_copy", "created_at", "updated_at") @new_shixun.user_id = User.current.id @new_shixun.averge_star = 5 @new_shixun.identifier = generate_identifier Shixun, 8 diff --git a/app/views/games/picture_display.json.jbuilder b/app/views/games/picture_display.json.jbuilder index 838cfeda0..770f0d71b 100644 --- a/app/views/games/picture_display.json.jbuilder +++ b/app/views/games/picture_display.json.jbuilder @@ -39,15 +39,10 @@ elsif @type == "mp3" || @type == "mp4" json.file_url attachment_show_users_path(:file_name => file, :path => @original_path) end end - # json.user_file do - # json.array! @user_picture do |file| - # json.file_url attachment_show_users_path(:file_name => file, :path => @user_path, :time => Time.now.to_i) - # end - # end - if @type == "mp4" - json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172/456.mp4"}] - else - json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] + json.user_file do + json.array! @user_picture do |file| + json.file_url attachment_show_users_path(:file_name => file, :path => @user_path, :time => Time.now.to_i) + end end json.answer_file do json.array! @answer_picture do |file|