Prefill email if previous feedback for the session exists
This commit is contained in:
parent
6dac654313
commit
29dd83c7b4
|
@ -18,6 +18,7 @@ class Public::ConferenceFeedbacksController < Public::ApplicationController
|
|||
@feedback = current_conference.feedbacks.where(session_id: session.id).order(updated_at: :asc).last
|
||||
else
|
||||
@feedback = current_conference.feedbacks.build
|
||||
@feedback.author_email = Feedback.where(session_id: session.id).order(updated_at: :asc).last.try(:author_email)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ class Public::EventFeedbacksController < Public::ApplicationController
|
|||
@feedback = event.feedbacks.where(session_id: session.id).order(updated_at: :asc).last
|
||||
else
|
||||
@feedback = event.feedbacks.build
|
||||
@feedback.author_email = Feedback.where(session_id: session.id).order(updated_at: :asc).last.try(:author_email)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue