Sha256: 489f7866a27f60b20239cc3cba153bb1183f35263f50f9d9864cb1eaaa32f223
Contents?: true
Size: 1.33 KB
Versions: 8
Compression:
Stored size: 1.33 KB
Contents
Every method should have documentation above the method definition that fits this basic model... # Render the specified item, with the specified options. # # ==== Parameters # thing<String, Symbol, nil>:: # The thing to render. This will default to the current action # opts<Hash>:: An options hash (see below) # # ==== Options (opts) # :format<Symbol>:: A registered mime-type format # :template<String>:: # The path to the template relative to the template root # :status<~to_i>:: # The status to send to the client. Typically, this would # be an integer (200), or a Merb status code (Accepted) # :layout<~to_s>:: # A layout to use instead of the default. This should be # relative to the layout root. By default, the layout will # be either the controller_name or application. If you # want to use an alternative content-type than the one # that the base template was rendered as, you will need # to do :layout => “foo.#{content_type}” (i.e. “foo.json”) # # ==== Returns # String:: The rendered template, including layout, if appropriate. # # ==== Raises # TemplateNotFound:: # There is no template for the specified location. # # ==== Alternatives # If you pass a Hash as the first parameter, it will be moved to # opts and “thing” will be the current action # #— # @public def render(thing = nil, opts = {}) <snip> end
Version data entries
8 entries across 8 versions & 3 rubygems