Skip to content

Commit

Permalink
Revert "Use sprockets to serve js file"
Browse files Browse the repository at this point in the history
  • Loading branch information
jbirdjavi authored Dec 5, 2023
1 parent ea8b0f3 commit 7f2939c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ import 'jquery-validation'
import '@activeadmin/activeadmin'

import './custom/active_admin_custom'
import './custom/campaign-form'
File renamed without changes.
1 change: 0 additions & 1 deletion app/views/admin/forms/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@
<a href="https://policies.google.com/terms">Terms of Service</a> apply.
</small>
<style>.grecaptcha-badge { visibility: hidden; } </style>
<script type="application/javascript" src="<%= asset_url '/assets/campaign-form.js' %>"></script>
<% if form.use_recaptcha %><script type="application/javascript" src='https://www.google.com/recaptcha/api.js<%= "?render=#{form.recaptcha_key}" if form.recaptcha_v3 %>'></script><% end %>
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@

get "monitors/lb"
get "/login/new", to: "login#new"
get "/assets/campaign-form.js", to: redirect("/campaign-form.js")
get "/packs/campaign.js", to: redirect("/campaign-form.js")
get "/assets/campaign-form.js", to: redirect("/assets/custom/campaign-form.js")
get "/packs/campaign.js", to: redirect("/assets/custom/campaign-form.js")
end

0 comments on commit 7f2939c

Please sign in to comment.