Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app/controllers/landing_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@ def index
def sign_up
email = params.require(:email).downcase
ref = params[:ref]

# flash error "signups are closed"
respond_to do |format|
format.html { redirect_to request.referer || projects_path, alert: "Signups are closed" }
format.json { render json: { ok: false, error: "Signups are closed" }, status: :service_unavailable }
format.turbo_stream do
flash.now[:alert] = "Signups are closed"
render turbo_stream: turbo_stream.update("flash-container", partial: "shared/flash"),
status: :service_unavailable
end
end
return
unless email.match?(URI::MailTo::EMAIL_REGEXP)
return respond_to do |format|
format.html { redirect_to request.referer || projects_path, alert: "Invalid email format" }
Expand Down
2 changes: 1 addition & 1 deletion app/views/landing/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Build stuff. Get stuff. <span class="font-bold text-som-orange">Repeat.</span>
</h2>
<div class="flex flex-col self-stretch sm:flex-row gap-3">
<%= render "signup" %>
<%# render "signup" #%>
</div>
<div class="flex flex-col items-center mx-auto">
<p class="font-['Fredoka',sans-serif] font-normal mb-1 -mx-2 text-lg sm:text-xl self-center text-[#3a2f25 relative">
Expand Down