diff --git a/app/controllers/fullcalendar_engine/events_controller.rb b/app/controllers/fullcalendar_engine/events_controller.rb index 897adc7..80dd322 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 get_events + def index 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 70db4d8..990c4fe 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/get_events" +FullcalendarEngine::Configuration['events'] = "#{FullcalendarEngine::Configuration['mount_path']}/events" diff --git a/config/routes.rb b/config/routes.rb index 72b3099..56314f8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,12 +1,9 @@ FullcalendarEngine::Engine.routes.draw do - root :to => 'events#index' resources :events do - collection do - get :get_events - end member do post :move post :resize end end + root :to => 'events#index' end \ No newline at end of file