diff options
| author | Luc Donnet | 2012-02-20 22:44:44 +0100 |
|---|---|---|
| committer | Luc Donnet | 2012-02-20 22:44:44 +0100 |
| commit | da3e849d4d89ffa3de2d370a30d3d5531b50ea5b (patch) | |
| tree | 26d0e12a135753d0acf4a59a7007006aac5e759a /app/controllers | |
| parent | a0823f387ddea69b0f207ba35165fcfd13b169d3 (diff) | |
| download | chouette-core-da3e849d4d89ffa3de2d370a30d3d5531b50ea5b.tar.bz2 | |
Add requests spec, Fix view
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/chouette_controller.rb | 4 | ||||
| -rw-r--r-- | app/controllers/companies_controller.rb | 15 | ||||
| -rw-r--r-- | app/controllers/referentials_controller.rb | 7 |
3 files changed, 18 insertions, 8 deletions
diff --git a/app/controllers/chouette_controller.rb b/app/controllers/chouette_controller.rb index 051e2fd77..1b9f30a85 100644 --- a/app/controllers/chouette_controller.rb +++ b/app/controllers/chouette_controller.rb @@ -7,7 +7,7 @@ class ChouetteController < InheritedResources::Base end def referential - @referential = Referential.find params[:referential_id] + @referential ||= Referential.find params[:referential_id] end -end
\ No newline at end of file +end diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb index 3cb440ea2..4fb83d789 100644 --- a/app/controllers/companies_controller.rb +++ b/app/controllers/companies_controller.rb @@ -4,4 +4,19 @@ class CompaniesController < ChouetteController respond_to :xml respond_to :json + # def update + # update! do |success, failure| + # failure.html { redirect_to referential_companies_path(@resource, @referential) } + # end + # end + + protected + + + # def resource_url(company = nil) + # puts "########################################" + # puts referential_company_path(referential, company || @resource).inspect + # referential_company_path(referential, company || @resource) + # end + end diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index 539c7ca5d..a5e3b7247 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -1,9 +1,4 @@ class ReferentialsController < InheritedResources::Base - - before_filter :switch_referential - - def switch_referential - Apartment::Database.switch(referential.slug) - end + respond_to :html end |
