Skip to content

Commit

Permalink
option to specify custom urls
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Jan 20, 2014
1 parent 1d4d6e7 commit 4155590
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ In the following file +config/routes.rb+ you can put this configuration
wash_out :my_other_service
end

mount WashoutBuilder::Engine => "/washout"

You can access the url +/washout+ and you will see a list with available services ( in our case there are only two : The RumbasController and MyOtherServiceController) with links to their documentation and where you can find the WSDL.

If you want to access directly the hml documentation that was generated for RumbasController you can do that by accessing url +/rumbas/doc+ And the WSDL will be available at +/rumbas/wsdl+
Expand Down
5 changes: 2 additions & 3 deletions lib/washout_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ class Mapper
# Adds the routes for a SOAP endpoint at +controller+.
def wash_out(controller_name, options={})
options.reverse_merge!(@scope) if @scope

urldoc = options[:documentation_url].present? ? options[:documentation_url] : "doc"
match "#{controller_name}/#{urldoc}" => "#{controller_name}#_generate_doc", :via => :get, :format => false

match "#{controller_name}/doc" => "#{controller_name}#_generate_doc", :via => :get, :format => false
original_wash_out(controller_name, options)


Expand Down

0 comments on commit 4155590

Please sign in to comment.