diff options
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r-- | app/controllers/wiki_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 7609323f4..37a36bf56 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -69,7 +69,7 @@ class WikiController < ApplicationController #@content.text = params[:content][:text] #@content.comments = params[:content][:comments] @content.attributes = params[:content] - @content.author = logged_in_user + @content.author = User.current # if page is new @page.save will also save content, but not if page isn't a new record if (@page.new_record? ? @page.save : @content.save) redirect_to :action => 'index', :id => @project, :page => @page.title @@ -157,7 +157,7 @@ class WikiController < ApplicationController # Save the attachments params[:attachments].each { |file| next unless file.size > 0 - a = Attachment.create(:container => @page, :file => file, :author => logged_in_user) + a = Attachment.create(:container => @page, :file => file, :author => User.current) } if params[:attachments] and params[:attachments].is_a? Array redirect_to :action => 'index', :page => @page.title end |