Changeset 727

Show
Ignore:
Timestamp:
10/07/07 17:38:58 (1 year ago)
Author:
e.@brainspl.at
Message:

change @controller._template to @controller.template, fixed merb.yml so it binds to 0.0.0.0 by default

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app_generators/merb/templates/config/merb.yml

    r692 r727  
    11--- 
    22# Hostname or IP address to bind to.  
    3 :host: 127.0.0.1 
     3:host: 0.0.0.0 
    44 
    55# Port merb runs on or starting port for merb cluster. 
  • trunk/lib/merb/mixins/render.rb

    r724 r727  
    1313        self._template_root = File.expand_path(MERB_VIEW_ROOT) 
    1414         
    15         attr_accessor :_template         
     15        attr_accessor :template         
    1616      } 
    1717    end 
     
    163163        raise TemplateNotFound, "No template matched #{unmatched}" 
    164164      end 
    165       self._template = File.basename(template) 
     165      self.template = File.basename(template) 
    166166 
    167167      engine = Template.engine_for(template) 
     
    291291        else 
    292292          raise "called find_template without an :action or :layout"   
    293         end 
    294         if cached = @@cached_templates[path] 
    295           return cached  
    296         end   
     293        end  
    297294        extensions = Template::EXTENSIONS.keys 
    298295        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) 
    306297      end 
    307298       
  • trunk/spec/merb/render_spec.rb

    r724 r727  
    191191    c = new_controller 
    192192    content = c.render(:template => "erubis") 
    193     c._template.should == "erubis.herb" 
     193    c.template.should == "erubis.herb" 
    194194  end 
    195195