Sha256: 5824be53cc1b84dbb796125d2662ee0a4302a5a6da4be0783948ab2271767210

Contents?: true

Size: 1005 Bytes

Versions: 33

Compression:

Stored size: 1005 Bytes

Contents

class WashoutBuilderController < ActionController::Base
  protect_from_forgery

  def all
    # get a list of unique controller names
    controllers = Rails.application.routes.routes.map do |route|
      if route.defaults[:action] == "_generate_doc"
        {:class => "#{route.defaults[:controller]}_controller".camelize.constantize, :name => route.defaults[:controller] }
      end
    end.uniq.compact

    @services = []
    unless controllers.blank?
      controllers.map do |hash|
        namespace  = hash[:class].soap_config.namespace
        @services << {
          :service_name =>  hash[:class].to_s.underscore.gsub("_controller", "").camelize ,
          :namespace => namespace,
          :endpoint => namespace.gsub("/wsdl", "/action"),
          :documentation_url => "#{request.protocol}#{request.host_with_port}/#{hash[:name]}/doc",
        }
      end
    end


    render :template => "wash_with_html/all_services", :layout => false,
      :content_type => 'text/html'

  end




end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
washout_builder-0.11.2 app/controllers/washout_builder_controller.rb
washout_builder-0.11.1 app/controllers/washout_builder_controller.rb
washout_builder-0.10.4 app/controllers/washout_builder_controller.rb
washout_builder-0.10.3 app/controllers/washout_builder_controller.rb
washout_builder-0.10.2 app/controllers/washout_builder_controller.rb
washout_builder-0.10.1 app/controllers/washout_builder_controller.rb
washout_builder-0.9.12 app/controllers/washout_builder_controller.rb
washout_builder-0.9.10 app/controllers/washout_builder_controller.rb
washout_builder-0.9.9 app/controllers/washout_builder_controller.rb
washout_builder-0.9.8 app/controllers/washout_builder_controller.rb
washout_builder-0.9.7 app/controllers/washout_builder_controller.rb
washout_builder-0.9.6 app/controllers/washout_builder_controller.rb
washout_builder-0.9.5 app/controllers/washout_builder_controller.rb
washout_builder-0.9.1 app/controllers/washout_builder_controller.rb
washout_builder-0.9.0 app/controllers/washout_builder_controller.rb
washout_builder-0.8.12 app/controllers/washout_builder_controller.rb
washout_builder-0.8.11 app/controllers/washout_builder_controller.rb
washout_builder-0.8.10 app/controllers/washout_builder_controller.rb
washout_builder-0.8.9 app/controllers/washout_builder_controller.rb
washout_builder-0.8.8 app/controllers/washout_builder_controller.rb