lib/rapidoc/resource_doc.rb in rapidoc-0.0.4 vs lib/rapidoc/resource_doc.rb in rapidoc-0.0.5

- old
+ new

@@ -14,11 +14,11 @@ # @param resource_name [String] resource name # @param routes_doc [RoutesDoc] routes documentation # def initialize( resource_name, routes_actions_info ) @name = resource_name.to_s - @controller_file = name.to_s.pluralize + '_controller.rb' + @controller_file = name.to_s.pluralize + '_controller' + controllers_extension generate_info routes_actions_info end ## @@ -36,9 +36,12 @@ def generate_info( routes_info ) if routes_info extractor = get_controller_extractor @description = extractor.get_resource_info['description'] if extractor @actions_doc = get_actions_doc( routes_info, extractor ) + + # template need that description will be an array + @description = [ @description ] unless @description.class == Array end end ## # @return [ControllerExtractor] extractor that allow read controller files