mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Show author names in problem and translation views
This commit is contained in:
@@ -13,6 +13,9 @@ class TranslationsController < ApplicationController
|
||||
# POST /translations
|
||||
def create
|
||||
@translation = @problem.translations.new(translation_params)
|
||||
if user_signed_in?
|
||||
@translation.author = current_user
|
||||
end
|
||||
if @translation.save
|
||||
redirect_to @problem, notice: t('translations.notice.successfully_created')
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user