aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/companies_controller.rb11
-rw-r--r--app/controllers/lines_controller.rb8
-rw-r--r--app/controllers/networks_controller.rb9
-rw-r--r--app/views/layouts/application.html.erb2
4 files changed, 24 insertions, 6 deletions
diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb
index 4fb83d789..2b13d78cf 100644
--- a/app/controllers/companies_controller.rb
+++ b/app/controllers/companies_controller.rb
@@ -12,11 +12,12 @@ class CompaniesController < ChouetteController
protected
+ def resource_url(company = nil)
+ referential_company_path(referential, company || resource)
+ end
- # def resource_url(company = nil)
- # puts "########################################"
- # puts referential_company_path(referential, company || @resource).inspect
- # referential_company_path(referential, company || @resource)
- # end
+ def collection_url
+ referential_companies_path(referential)
+ end
end
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb
index 2ee4d8729..a5be8ca44 100644
--- a/app/controllers/lines_controller.rb
+++ b/app/controllers/lines_controller.rb
@@ -19,4 +19,12 @@ class LinesController < ChouetteController
%w(asc desc).include?(params[:direction]) ? params[:direction] : "asc"
end
+ def resource_url(line = nil)
+ referential_line_path(referential, line || resource)
+ end
+
+ def collection_url
+ referential_lines_path(referential)
+ end
+
end
diff --git a/app/controllers/networks_controller.rb b/app/controllers/networks_controller.rb
index eed00f365..b9423c976 100644
--- a/app/controllers/networks_controller.rb
+++ b/app/controllers/networks_controller.rb
@@ -4,4 +4,13 @@ class NetworksController < ChouetteController
respond_to :xml
respond_to :json
+ protected
+
+ def resource_url(network = nil)
+ referential_network_path(referential, network || resource)
+ end
+
+ def collection_url
+ referential_networks_path(referential)
+ end
end
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 6fd73ef0d..d79351080 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -32,7 +32,7 @@
</div>
<div id="body">
<div id="flash">
- <% flash_tag flash %>
+ <%= flash_tag flash %>
</div>
<div id="workspace" class="<%= controller_name %> <%= action_name %>">
<%= yield %>