aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorZog2018-02-27 08:26:40 +0100
committercedricnjanga2018-03-01 18:20:56 -0800
commitab396d083c4e7197a20412b0148a7ba1012d64f9 (patch)
treed2742c096b30b80a2aa454dd8e77ad92cfe76637 /app/controllers
parent726e13de02e60c825f224aee62b8ea166740dd67 (diff)
downloadchouette-core-ab396d083c4e7197a20412b0148a7ba1012d64f9.tar.bz2
Refs #5940; Add missing flash after Calendar creation
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/calendars_controller.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb
index 75d4cbd09..cc7570d65 100644
--- a/app/controllers/calendars_controller.rb
+++ b/app/controllers/calendars_controller.rb
@@ -31,10 +31,11 @@ class CalendarsController < ChouetteController
end
def create
- create! do
- if @calendar.valid? && has_feature?('application_days_on_calendars')
- redirect_to([:edit, @calendar])
- return
+ create! do |success, failure|
+ if has_feature?('application_days_on_calendars')
+ success.html do
+ redirect_to([:edit, @workgroup, @calendar])
+ end
end
end
end
@@ -125,4 +126,4 @@ class CalendarsController < ChouetteController
scope
end
-end \ No newline at end of file
+end