public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Fixes #148 (:format => :html possible in partials)
wycats (author)
Tue Feb 26 17:09:18 -0800 2008
commit  c1d3cb6705b22d8ae72be0305f21dd434dbae2fe
tree    9fdc45d01eafb5db32cdd9a774bd86f019c609d5
parent  05d18801db1d5e65d0cfce32c3cc8b49e4505eeb
...
163
164
165
 
166
167
168
...
180
181
182
183
 
184
185
186
...
163
164
165
166
167
168
169
...
181
182
183
 
184
185
186
187
0
@@ -163,6 +163,7 @@ module Merb::RenderMixin
0
   # :with<Object, Array>::
0
   # An object or an array of objects that will be passed into the partial.
0
   # :as<~to_sym>:: The local name of the :with Object inside of the partial.
0
+ # :format<Symbol>:: The mime format that you want the partial to be in (:js, :html, etc.)
0
   # others::
0
   # A Hash object names and values that will be the local names and values
0
   # inside the partial.
0
@@ -180,7 +181,7 @@ module Merb::RenderMixin
0
     kontroller = (m = template.match(/.*(?=\/)/)) ? m[0] : controller_name
0
     template = "_#{File.basename(template)}"
0
     
0
- template_method, template_location = _template_for(template, content_type, kontroller)
0
+ template_method, template_location = _template_for(template, opts.delete(:format) || content_type, kontroller)
0
 
0
     (@_old_partial_locals ||= []).push @_merb_partial_locals
0
 

Comments

    No one has commented yet.