adding contact form

This commit is contained in:
Karl-Heinz Wild
2025-12-10 19:12:09 +01:00
parent 40df42bfd9
commit 2a0325196f
3 changed files with 32 additions and 1 deletions

View File

@ -5,4 +5,20 @@ class WelcomeController < ApplicationController
def pages
render params[:page]
end
def contact
@name = params.fetch(:name, "kein Name angegeben")
puts @name
respond_to do |format|
format.turbo_stream do
render turbo_stream: turbo_stream.update("contact",
partial: "welcome/contact_form",
locals: {
name: @name
}
)
end
end
end
end