From 0412d82c225ddd47e3c0436ae5d421b1098d2fa0 Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Mon, 2 Jul 2012 08:11:29 +0200 Subject: add file validation --- app/controllers/file_validations_controller.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/controllers/file_validations_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/file_validations_controller.rb b/app/controllers/file_validations_controller.rb new file mode 100644 index 000000000..0f0dcf71b --- /dev/null +++ b/app/controllers/file_validations_controller.rb @@ -0,0 +1,17 @@ +class FileValidationsController < InheritedResources::Base + respond_to :html, :xml, :json + + + def create + create! do |success, failure| + success.html { redirect_to file_validations_path } + end + end + + protected + + def collection + @file_validations ||= end_of_association_chain.paginate(:page => params[:page]) + end + +end -- cgit v1.2.3 From a979d088d7c9e901b2fbdbda8a3e4362870bff73 Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Tue, 3 Jul 2012 16:34:45 +0200 Subject: Log ENV to debug RAILS_RELATIVE_URL_ROOT. Refs #4 --- app/controllers/stop_areas_controller.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb index 8d68fd1d5..71fa602cc 100644 --- a/app/controllers/stop_areas_controller.rb +++ b/app/controllers/stop_areas_controller.rb @@ -68,6 +68,9 @@ class StopAreasController < ChouetteController alias_method :stop_area, :resource def map + ENV.each do |key, value| + Rails.logger.info "ENV['#{key}'] = '#{value}'" + end @map = StopAreaMap.new(stop_area).with_helpers(self) end -- cgit v1.2.3 From e59dc611c392976b654d3fbde34188dae97a657b Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Wed, 4 Jul 2012 10:42:10 +0200 Subject: add object count to dashboard --- app/controllers/referentials_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index a5e3b7247..face0663f 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -1,4 +1,10 @@ class ReferentialsController < InheritedResources::Base respond_to :html + def show + resource.switch + show! + end + + end -- cgit v1.2.3 From 9c3bdd3da00322e8dd0d1b7223f93dc200967d6b Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Thu, 5 Jul 2012 16:04:50 +0200 Subject: add test descriptions for validation --- app/controllers/file_validations_controller.rb | 9 +++++++++ app/controllers/test_sheet_controller.rb | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 app/controllers/test_sheet_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/file_validations_controller.rb b/app/controllers/file_validations_controller.rb index 0f0dcf71b..f56cf8ceb 100644 --- a/app/controllers/file_validations_controller.rb +++ b/app/controllers/file_validations_controller.rb @@ -1,6 +1,15 @@ class FileValidationsController < InheritedResources::Base respond_to :html, :xml, :json + def show + @toc = TestSheetPage.find("toc") + show! + end + + def new + @toc = TestSheetPage.find("toc") + new! + end def create create! do |success, failure| diff --git a/app/controllers/test_sheet_controller.rb b/app/controllers/test_sheet_controller.rb new file mode 100644 index 000000000..5bc3374e2 --- /dev/null +++ b/app/controllers/test_sheet_controller.rb @@ -0,0 +1,14 @@ +class TestSheetController < ApplicationController + + def show + @page = TestSheetPage.find(slug) + @toc = TestSheetPage.find("toc") + end + + private + + def slug + params[:slug] or "toc" + end + +end -- cgit v1.2.3 From ab123be8d9f909b46de5e0f049eb49a8f4c6183c Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Thu, 5 Jul 2012 18:40:41 +0200 Subject: Upgrade Rails to 3.2.6. Refs #91 --- app/controllers/stop_areas_controller.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb index 71fa602cc..8d68fd1d5 100644 --- a/app/controllers/stop_areas_controller.rb +++ b/app/controllers/stop_areas_controller.rb @@ -68,9 +68,6 @@ class StopAreasController < ChouetteController alias_method :stop_area, :resource def map - ENV.each do |key, value| - Rails.logger.info "ENV['#{key}'] = '#{value}'" - end @map = StopAreaMap.new(stop_area).with_helpers(self) end -- cgit v1.2.3