aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-05-10 16:34:28 +0200
committerMarc Florisson2012-05-10 16:34:28 +0200
commit6aff17e4979283d78ddc043204a6f4a305b7ff82 (patch)
tree34f09cde36595124da53e0dc69ba9f1bf7318c8d
parent3668afc02d6f3d8749499b065f51392330ebe6ed (diff)
downloadchouette-core-6aff17e4979283d78ddc043204a6f4a305b7ff82.tar.bz2
add missing path for postgres adapter
-rw-r--r--app/views/routes/show.html.erb2
-rw-r--r--config/initializers/postgresql_adapter_patch.rb11
2 files changed, 12 insertions, 1 deletions
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 7e9b569c3..f1c738159 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -75,7 +75,7 @@
<ul class="actions">
<li><%= link_to t('routes.actions.edit'), edit_referential_line_route_path(@referential, @line, @route), :class => "edit" %></li>
<li><%= link_to t('routes.actions.destroy'), referential_line_route_path(@referential, @line, @route), :method => :delete, :confirm => t('routes.actions.destroy_confirm'), :class => "remove" %></li>
- <li><%= link_to t('stop_points.actions.index'), referential_line_route_stop_points_path(@referential, @line, @route), :class => "link" %></li>
+ <li><%=# link_to t('stop_points.actions.index'), referential_line_route_stop_points_path(@referential, @line, @route), :class => "link" %></li>
<br>
</ul>
<% end %>
diff --git a/config/initializers/postgresql_adapter_patch.rb b/config/initializers/postgresql_adapter_patch.rb
new file mode 100644
index 000000000..916933b39
--- /dev/null
+++ b/config/initializers/postgresql_adapter_patch.rb
@@ -0,0 +1,11 @@
+module ::ArJdbc
+ module PostgreSQL
+ def quote_column_name(name)
+ if name.is_a?(Array)
+ name.collect { |n| %("#{n.to_s.gsub("\"", "\"\"")}") }.join(',')
+ else
+ %("#{name.to_s.gsub("\"", "\"\"")}")
+ end
+ end
+ end
+end