From c5710e30b098a623c525df4ec95eb0f2383b5780 Mon Sep 17 00:00:00 2001 From: Aditya Kapoor Date: Thu, 26 Jun 2014 12:09:52 +0530 Subject: [PATCH] Rollback Route Change --- app/controllers/fullcalendar_engine/events_controller.rb | 2 +- config/initializers/configuration.rb | 2 +- config/routes.rb | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/controllers/fullcalendar_engine/events_controller.rb b/app/controllers/fullcalendar_engine/events_controller.rb index 80dd322..897adc7 100644 --- a/app/controllers/fullcalendar_engine/events_controller.rb +++ b/app/controllers/fullcalendar_engine/events_controller.rb @@ -22,7 +22,7 @@ def new end end - def index + def get_events start_time = Time.at(params[:start].to_i).to_formatted_s(:db) end_time = Time.at(params[:end].to_i).to_formatted_s(:db) diff --git a/config/initializers/configuration.rb b/config/initializers/configuration.rb index 990c4fe..70db4d8 100644 --- a/config/initializers/configuration.rb +++ b/config/initializers/configuration.rb @@ -15,4 +15,4 @@ 'timeFormat' => "h:mm t{ - h:mm t}" } FullcalendarEngine::Configuration.merge!(config) -FullcalendarEngine::Configuration['events'] = "#{FullcalendarEngine::Configuration['mount_path']}/events" +FullcalendarEngine::Configuration['events'] = "#{FullcalendarEngine::Configuration['mount_path']}/events/get_events" diff --git a/config/routes.rb b/config/routes.rb index 56314f8..003665f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,8 @@ FullcalendarEngine::Engine.routes.draw do - resources :events do + resources :events do + collection do + get :get_events + end member do post :move post :resize