Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 9, 2013
1 parent 16c9f9e commit 6a45716
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions app/helpers/washout_builder_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def get_class_ancestors(param,class_name, defined)

def fix_descendant_wash_out_type(param, complex_class)
param_class = complex_class.is_a?(Class) ? complex_class : complex_class.constantize rescue nil
if !param_class.nil? && param_class.ancestors.include?(WashOut::Type)
if !param_class.nil? && param_class.ancestors.include?(WashOut::Type) && !param.map[0].nil?
param.name = param.map[0].name
param.map = param.map[0].map
param.map = WashOut::Param.parse_def(@soap_config, param_class.wash_out_param_map)[0].map
end
end

Expand All @@ -82,9 +82,8 @@ def get_nested_complex_types(param, defined)


def get_complex_types(map)
array = Marshal.load( Marshal.dump(map) )
defined = []
array.each do |operation, formats|
map.each do |operation, formats|
(formats[:in] + formats[:out]).each do |p|
defined.concat(get_nested_complex_types(p, defined))
end
Expand Down Expand Up @@ -212,7 +211,6 @@ def create_html_public_method(xml, operation, formats)
while j<mlen
param = formats[:in][j]
complex_class = get_complex_class_name(param)
fix_descendant_wash_out_type(param, complex_class)
use_spacer = mlen > 1 ? true : false
if WashoutBuilder::Type::BASIC_TYPES.include?(param.type)
pre << "#{use_spacer ? spacer: ''}<span class='blue'>#{param.type}</span>&nbsp;<span class='bold'>#{param.name}</span>"
Expand Down
2 changes: 1 addition & 1 deletion lib/washout_builder/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module WashoutBuilder
VERSION = "0.8.5"
VERSION = "0.8.6"
end

0 comments on commit 6a45716

Please sign in to comment.