From 21187c0fb4fc559927a2f947f909dedd85969ffb Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Wed, 21 Feb 2007 00:29:44 +0000
Subject: Apply the rest of Chads patch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
.../lib/action_web_service/scaffolding.rb | 10 ++--
.../templates/scaffolds/layout.erb | 65 ++++++++++++++++++++++
.../templates/scaffolds/layout.rhtml | 65 ----------------------
.../templates/scaffolds/methods.erb | 6 ++
.../templates/scaffolds/methods.rhtml | 6 --
.../templates/scaffolds/parameters.erb | 29 ++++++++++
.../templates/scaffolds/parameters.rhtml | 29 ----------
.../templates/scaffolds/result.erb | 30 ++++++++++
.../templates/scaffolds/result.rhtml | 30 ----------
9 files changed, 135 insertions(+), 135 deletions(-)
create mode 100644 actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb
create mode 100644 actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb
create mode 100644 actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb
create mode 100644 actionwebservice/lib/action_web_service/templates/scaffolds/result.erb
(limited to 'actionwebservice/lib')
diff --git a/actionwebservice/lib/action_web_service/scaffolding.rb b/actionwebservice/lib/action_web_service/scaffolding.rb
index e109857727..1ffe4eba77 100644
--- a/actionwebservice/lib/action_web_service/scaffolding.rb
+++ b/actionwebservice/lib/action_web_service/scaffolding.rb
@@ -25,10 +25,10 @@ module ActionWebService
#
# If you want to customize the default views, create the following views in "app/views":
#
- # * action_name/methods.rhtml
- # * action_name/parameters.rhtml
- # * action_name/result.rhtml
- # * action_name/layout.rhtml
+ # * action_name/methods.erb
+ # * action_name/parameters.erb
+ # * action_name/result.erb
+ # * action_name/layout.erb
#
# Where action_name is the name of the action you gave to ClassMethods#web_service_scaffold.
#
@@ -122,7 +122,7 @@ module ActionWebService
end
def scaffold_path(template_name)
- File.dirname(__FILE__) + "/templates/scaffolds/" + template_name + ".rhtml"
+ File.dirname(__FILE__) + "/templates/scaffolds/" + template_name + ".erb"
end
def reset_invocation_response
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb b/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb
new file mode 100644
index 0000000000..167613f681
--- /dev/null
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb
@@ -0,0 +1,65 @@
+
+
+ <%= @scaffold_class.wsdl_service_name %> Web Service
+
+
+
+
+<%= @content_for_layout %>
+
+
+
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml b/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml
index 167613f681..e69de29bb2 100644
--- a/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml
@@ -1,65 +0,0 @@
-
-
- <%= @scaffold_class.wsdl_service_name %> Web Service
-
-
-
-
-<%= @content_for_layout %>
-
-
-
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb b/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb
new file mode 100644
index 0000000000..60dfe23f07
--- /dev/null
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb
@@ -0,0 +1,6 @@
+<% @scaffold_container.services.each do |service| %>
+
+ API Methods for <%= service %>
+ <%= service_method_list(service) %>
+
+<% end %>
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml b/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml
index 60dfe23f07..e69de29bb2 100644
--- a/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml
@@ -1,6 +0,0 @@
-<% @scaffold_container.services.each do |service| %>
-
- API Methods for <%= service %>
- <%= service_method_list(service) %>
-
-<% end %>
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb b/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb
new file mode 100644
index 0000000000..767284e0d4
--- /dev/null
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb
@@ -0,0 +1,29 @@
+Method Invocation Details for <%= @scaffold_service %>#<%= @scaffold_method.public_name %>
+
+<% form_tag(:action => @scaffold_action_name + '_submit') do -%>
+<%= hidden_field_tag "service", @scaffold_service.name %>
+<%= hidden_field_tag "method", @scaffold_method.public_name %>
+
+
+
+<%= select_tag 'protocol', options_for_select([['SOAP', 'soap'], ['XML-RPC', 'xmlrpc']], params['protocol']) %>
+
+
+<% if @scaffold_method.expects %>
+
+Method Parameters:
+<% @scaffold_method.expects.each_with_index do |type, i| %>
+
+
+ <%= method_parameter_input_fields(@scaffold_method, type, "method_params", i) %>
+
+<% end %>
+
+<% end %>
+
+<%= submit_tag "Invoke" %>
+<% end -%>
+
+
+<%= link_to "Back", :action => @scaffold_action_name %>
+
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml b/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
index 767284e0d4..e69de29bb2 100644
--- a/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
@@ -1,29 +0,0 @@
-Method Invocation Details for <%= @scaffold_service %>#<%= @scaffold_method.public_name %>
-
-<% form_tag(:action => @scaffold_action_name + '_submit') do -%>
-<%= hidden_field_tag "service", @scaffold_service.name %>
-<%= hidden_field_tag "method", @scaffold_method.public_name %>
-
-
-
-<%= select_tag 'protocol', options_for_select([['SOAP', 'soap'], ['XML-RPC', 'xmlrpc']], params['protocol']) %>
-
-
-<% if @scaffold_method.expects %>
-
-Method Parameters:
-<% @scaffold_method.expects.each_with_index do |type, i| %>
-
-
- <%= method_parameter_input_fields(@scaffold_method, type, "method_params", i) %>
-
-<% end %>
-
-<% end %>
-
-<%= submit_tag "Invoke" %>
-<% end -%>
-
-
-<%= link_to "Back", :action => @scaffold_action_name %>
-
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb b/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb
new file mode 100644
index 0000000000..5317688fcd
--- /dev/null
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb
@@ -0,0 +1,30 @@
+Method Invocation Result for <%= @scaffold_service %>#<%= @scaffold_method.public_name %>
+
+
+Invocation took <%= '%f' % @method_elapsed %> seconds
+
+
+
+Return Value:
+
+<%= h @method_return_value.inspect %>
+
+
+
+
+Request XML:
+
+<%= h @method_request_xml %>
+
+
+
+
+Response XML:
+
+<%= h @method_response_xml %>
+
+
+
+
+<%= link_to "Back", :action => @scaffold_action_name + '_method_params', :method => @scaffold_method.public_name, :service => @scaffold_service.name %>
+
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml b/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml
index 5317688fcd..e69de29bb2 100644
--- a/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml
@@ -1,30 +0,0 @@
-Method Invocation Result for <%= @scaffold_service %>#<%= @scaffold_method.public_name %>
-
-
-Invocation took <%= '%f' % @method_elapsed %> seconds
-
-
-
-Return Value:
-
-<%= h @method_return_value.inspect %>
-
-
-
-
-Request XML:
-
-<%= h @method_request_xml %>
-
-
-
-
-Response XML:
-
-<%= h @method_response_xml %>
-
-
-
-
-<%= link_to "Back", :action => @scaffold_action_name + '_method_params', :method => @scaffold_method.public_name, :service => @scaffold_service.name %>
-
--
cgit v1.2.3