mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
add developer newsletters form
This commit is contained in:
1 parent
4180d02a1b
commit
3cceaf5cc7
5 files changed
+36
-1
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class NewslettersController < ApplicationController
|
||||
def show; end
|
||||
|
||||
def update
|
||||
Faraday.post(Docuseal::NEWSLETTER_URL, newsletter_params.to_json, 'Content-Type' => 'application/json')
|
||||
rescue StandardError => e
|
||||
Rails.logger.error(e)
|
||||
ensure
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def newsletter_params
|
||||
params.require(:user).permit(:email)
|
||||
end
|
||||
end
|
||||
@@ -30,7 +30,7 @@ class SetupController < ApplicationController
|
||||
|
||||
sign_in(@user)
|
||||
|
||||
redirect_to root_path
|
||||
redirect_to newsletter_path
|
||||
else
|
||||
render :index, status: :unprocessable_entity
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user