|
|
|
@ -15,12 +15,14 @@ class ForumsController < ApplicationController
|
|
|
|
|
PageLimit = 20
|
|
|
|
|
def create_feedback
|
|
|
|
|
if User.current.logged?
|
|
|
|
|
@memo = Memo.new(params[:memo])
|
|
|
|
|
@memo.forum_id = "1"
|
|
|
|
|
@memo.author_id = User.current.id
|
|
|
|
|
#@memo = Memo.new(params[:memo])
|
|
|
|
|
#@memo.forum_id = "1"
|
|
|
|
|
#@memo.author_id = User.current.id
|
|
|
|
|
#@forum = @memo.forum
|
|
|
|
|
cs = CommentService.new
|
|
|
|
|
@memo = cs.create_feedback params,User.current
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
if @memo.save
|
|
|
|
|
if !@memo.new_record?
|
|
|
|
|
format.html { redirect_to forum_path(@memo.forum) }
|
|
|
|
|
else
|
|
|
|
|
sort_init 'updated_at', 'desc'
|
|
|
|
|