Add email notifications for events registrations, add switch-checkboxes, create EventsRegistrations controller, separate page for events that require registration

This commit is contained in:
Stella Rouzi 2016-06-06 12:31:57 +03:00
parent 139a8565e2
commit 77af75f319
38 changed files with 1313 additions and 403 deletions

View file

@ -3,8 +3,8 @@ module ApplicationHelper
# ====Returns
# * +String+ -> number of registrations / max allowed registrations
def registered_text(event)
return "Registered: #{event.registrations.count}/#{event.max_attendees}" if event.max_attendees
"Registered: #{event.registrations.count}"
return "#{event.registrations.count}/#{event.max_attendees}" if event.max_attendees
return "#{event.registrations.count}"
end
# Set resource_name for devise so that we can call the devise help links (views/devise/shared/_links) from anywhere (eg sign_up form in proposal#new)