aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorXinhui2017-05-22 15:22:52 +0200
committerXinhui2017-05-22 15:22:59 +0200
commit897bc5fb10b1867970367ede388feac0ac1a5791 (patch)
tree0f62692076d035a470033bc43082b96228162df3 /app/controllers/time_tables_controller.rb
parent7b498a92d79a0305b98418774b65cf9fcb1ce237 (diff)
downloadchouette-core-897bc5fb10b1867970367ede388feac0ac1a5791.tar.bz2
TimeTables#actualize retrieve dates & periods from calendar
Refs #3445
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
-rw-r--r--app/controllers/time_tables_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb
index 228b31c05..dcf8f3e5e 100644
--- a/app/controllers/time_tables_controller.rb
+++ b/app/controllers/time_tables_controller.rb
@@ -95,6 +95,15 @@ class TimeTablesController < ChouetteController
render :new
end
+ def actualize
+ @time_table = resource
+ if @time_table.calendar
+ @time_table.actualize
+ flash[:notice] = t('.success')
+ end
+ redirect_to referential_time_table_path @referential, @time_table
+ end
+
def tags
@tags = ActsAsTaggableOn::Tag.where("tags.name LIKE ?", "%#{params[:tag]}%")
respond_to do |format|