diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 7258b076..d58b9bdf 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -141,6 +141,7 @@ class AccountController < ApplicationController @resubmit = "#{code}" @agreement = Help.first @cooperation = Cooperation.all + @url = params[:url] @com_coop_img = CooImg.where(:img_type => 'com_coop').order("position asc") @edu_coop_img = CooImg.where(:img_type => 'edu_coop').order("position asc") @@ -208,7 +209,7 @@ class AccountController < ApplicationController end def insert_suggest - content = "
[#{params[:question_kind]}]
" + params[:description] + content = "[#{params[:question_kind]}]
" + "问题页面网址:#{params[:url]}
" + params[:description] PrivateMessage.create(:user_id => User.current.id, :target_id => 1, :sender_id => User.current.id, :receiver_id => 1, :content => content, :send_time => Time.now, :status => 1) PrivateMessage.create(:user_id => 1, :target_id => User.current.id, :sender_id => User.current.id, :receiver_id => 1, :content => content, :send_time => Time.now, :status => 0) redirect_to message_detail_user_path(User.current, :user_id => 1) diff --git a/app/views/account/_suggest_show.html.erb b/app/views/account/_suggest_show.html.erb index 9279d45a..e1891d13 100644 --- a/app/views/account/_suggest_show.html.erb +++ b/app/views/account/_suggest_show.html.erb @@ -1,6 +1,6 @@ <%= stylesheet_link_tag 'css/public','css/common'%> <%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> + <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> <% end %>内容不能为空
+ + + + + + + 提交