|
|
|
@ -48,8 +48,10 @@ class EventsController < InheritedResources::Base
|
|
|
|
|
if @event.save |
|
|
|
|
# Send an event creation mail to its author |
|
|
|
|
EventMailer.create(@event).deliver |
|
|
|
|
# Send a mail to moderators |
|
|
|
|
ModerationMailer.create(@event).deliver |
|
|
|
|
|
|
|
|
|
format.html { redirect_to @event, notice: 'Event was successfully created.' } |
|
|
|
|
format.html { redirect_to @event, notice: t('.ok') } |
|
|
|
|
format.json { render action: 'show', status: :created, location: @event } |
|
|
|
|
else |
|
|
|
|
format.html { render action: 'new' } |
|
|
|
@ -73,7 +75,7 @@ class EventsController < InheritedResources::Base
|
|
|
|
|
|
|
|
|
|
respond_to do |format| |
|
|
|
|
if @event.update(event_params) |
|
|
|
|
format.html { redirect_to @event, notice: 'Event was successfully updated.' } |
|
|
|
|
format.html { redirect_to @event, notice: t('.ok') } |
|
|
|
|
format.json { head :no_content } |
|
|
|
|
else |
|
|
|
|
format.html { render action: 'edit' } |
|
|
|
|