mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 21:24:05 +00:00
Merge pull request #318 from gopesht/notify_on_venue_change
Email notification to all participants on venue update
This commit is contained in:
commit
b2ab893d17
8 changed files with 40 additions and 4 deletions
|
|
@ -6,7 +6,15 @@ class Admin::VenueController < ApplicationController
|
|||
|
||||
def update
|
||||
@venue = @conference.venue
|
||||
if @venue.update_attributes!(params[:venue])
|
||||
@venue.assign_attributes(params[:venue])
|
||||
unless @venue.name.blank? || @venue.address.blank? || @conference.registrations.blank?
|
||||
if @venue.name_changed? || @venue.address_changed? && @conference.email_settings.send_on_venue_update
|
||||
venue_notify = Mailbot.send_email_on_venue_update(@conference)
|
||||
end
|
||||
end
|
||||
|
||||
if @venue.update_attributes(params[:venue])
|
||||
venue_notify.deliver unless venue_notify.blank?
|
||||
redirect_to(admin_conference_venue_info_path(conference_id: @conference.short_title),
|
||||
notice: 'Venue was successfully updated.')
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue