Updated interest buttons to use ajax instead of a round-trip post

This commit is contained in:
Godwin
2016-06-11 16:45:22 -07:00
parent 0079c21f66
commit 30954e7907
5 changed files with 39 additions and 1 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
- else
=_'articles.workshops.info.interested_count', "#{workshop.interested_count} people are interested in this workshop", :vars => {:count => workshop.interested_count}
- if preview.blank? && workshop.can_show_interest?(current_user)
= form_tag toggle_workshop_interest_path(workshop.conference.slug, workshop.id) do
= form_tag toggle_workshop_interest_path(workshop.conference.slug, workshop.id), class: 'js-xhr' do
= button_tag (workshop.interested?(current_user) ? :remove_interest : :show_interest), :value => :toggle_interest, :class => (workshop.interested?(current_user) ? :delete : :add)
= richtext workshop.info
- if preview.blank? && translations_available_for_editing