ref: refs/heads/master
commit 748cf7396e321d18d025c62c4be1a59bdb5155b1
Author: Martin Kudlvasr
Date: Tue Sep 15 16:35:01 2009 +0200
small fixes of restfull-resource
---
webservice/app/models/resource.rb | 2 +-
webservice/app/views/resources/index.html.erb | 2 +-
webservice/app/views/resources/show.html.erb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/webservice/app/models/resource.rb b/webservice/app/models/resource.rb
index 417ec2b..7b4f37b 100644
--- a/webservice/app/models/resource.rb
+++ b/webservice/app/models/resource.rb
@@ -17,7 +17,7 @@ class Resource
end
def link_to
- "/#{@controller}/#{action}"
+ "/#{@controller}"
# url_for :only_path => :true,
# :controller => @controller,
# :action => (@singular ? :show : :index)
diff --git a/webservice/app/views/resources/index.html.erb b/webservice/app/views/resources/index.html.erb
index 24ef6fa..e8b8e32 100644
--- a/webservice/app/views/resources/index.html.erb
+++ b/webservice/app/views/resources/index.html.erb
@@ -1,4 +1,4 @@
<h1><%= @node -%> resources</h1>
<% @resources.implementations.each do |impl| -%>
- <%= link_to impl.interface, :controller => impl.controller, :action => impl.action -%><br/>
+ <%= link_to impl.interface, :only_path => :true, :controller => impl.controller, :action => impl.action -%><br/>
<% end -%>
diff --git a/webservice/app/views/resources/show.html.erb b/webservice/app/views/resources/show.html.erb
index 24ef6fa..e8b8e32 100644
--- a/webservice/app/views/resources/show.html.erb
+++ b/webservice/app/views/resources/show.html.erb
@@ -1,4 +1,4 @@
<h1><%= @node -%> resources</h1>
<% @resources.implementations.each do |impl| -%>
- <%= link_to impl.interface, :controller => impl.controller, :action => impl.action -%><br/>
+ <%= link_to impl.interface, :only_path => :true, :controller => impl.controller, :action => impl.action -%><br/>
<% end -%>
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org