diff options
| author | Marc Florisson | 2012-07-06 16:46:04 +0200 |
|---|---|---|
| committer | Marc Florisson | 2012-07-06 16:46:04 +0200 |
| commit | c0a4aeefa149f558daecbdbfeaf683a642771329 (patch) | |
| tree | e454e189d9af3601421256f4665b87a9db9fe4ce /app/controllers | |
| parent | a94b6b696990fd038cc425ed93f6971c1093e8cf (diff) | |
| parent | 9848694c64bf7e7183d23b8adce92a80fa0155b4 (diff) | |
| download | chouette-core-c0a4aeefa149f558daecbdbfeaf683a642771329.tar.bz2 | |
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/file_validations_controller.rb | 26 | ||||
| -rw-r--r-- | app/controllers/referentials_controller.rb | 6 | ||||
| -rw-r--r-- | app/controllers/test_sheet_controller.rb | 14 |
3 files changed, 46 insertions, 0 deletions
diff --git a/app/controllers/file_validations_controller.rb b/app/controllers/file_validations_controller.rb new file mode 100644 index 000000000..f56cf8ceb --- /dev/null +++ b/app/controllers/file_validations_controller.rb @@ -0,0 +1,26 @@ +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| + success.html { redirect_to file_validations_path } + end + end + + protected + + def collection + @file_validations ||= end_of_association_chain.paginate(:page => params[:page]) + end + +end 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 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 |
