method

parse_render

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: RenderParser
parse_render(node) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/render_parser.rb, line 48
      def parse_render(node)
        node = node.argument_nodes

        if (node.length == 1 || node.length == 2) && !node[0].hash?
          if node.length == 1
            options = normalize_args(node[0], nil)
          elsif node.length == 2
            options = normalize_args(node[0], node[1])
          end

          return nil unless options

          parse_render_from_options(options)
        elsif node.length == 1 && node[0].hash?
          options = parse_hash_to_symbols(node[0])

          return nil unless options

          parse_render_from_options(options)
        else
          nil
        end
      end
Register or log in to add new notes.