Changeset 727
- Timestamp:
- 10/07/07 17:38:58 (1 year ago)
- Files:
-
- trunk/app_generators/merb/templates/config/merb.yml (modified) (1 diff)
- trunk/lib/merb/mixins/render.rb (modified) (3 diffs)
- trunk/spec/merb/render_spec.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app_generators/merb/templates/config/merb.yml
r692 r727 1 1 --- 2 2 # Hostname or IP address to bind to. 3 :host: 127.0.0.13 :host: 0.0.0.0 4 4 5 5 # Port merb runs on or starting port for merb cluster. trunk/lib/merb/mixins/render.rb
r724 r727 13 13 self._template_root = File.expand_path(MERB_VIEW_ROOT) 14 14 15 attr_accessor : _template15 attr_accessor :template 16 16 } 17 17 end … … 163 163 raise TemplateNotFound, "No template matched #{unmatched}" 164 164 end 165 self. _template = File.basename(template)165 self.template = File.basename(template) 166 166 167 167 engine = Template.engine_for(template) … … 291 291 else 292 292 raise "called find_template without an :action or :layout" 293 end 294 if cached = @@cached_templates[path] 295 return cached 296 end 293 end 297 294 extensions = Template::EXTENSIONS.keys 298 295 glob = "#{path}.{#{opts[:ext] || extensions.join(',')}}" 299 if found = Dir[glob].first 300 @@cached_templates[path] = found 301 found 302 else 303 @_merb_unmatched = glob 304 nil 305 end 296 Dir[glob].first || (@_merb_unmatched = glob; nil) 306 297 end 307 298 trunk/spec/merb/render_spec.rb
r724 r727 191 191 c = new_controller 192 192 content = c.render(:template => "erubis") 193 c. _template.should == "erubis.herb"193 c.template.should == "erubis.herb" 194 194 end 195 195
