Changeset 660

Show
Ignore:
Timestamp:
09/20/07 16:46:08 (1 year ago)
Author:
e.@brainspl.at
Message:

fix DEFAULT_ERROR_TEMPLATE constant to work with frozen svn, closes #202 closes #187 thanks jtoy

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app_generators/merb/merb_generator.rb

    r642 r660  
    2929      m.file_copy_each %w( application.erb ), "app/mailers/views/layout" 
    3030      m.file_copy_each %w( application.html.erb ), "app/views/layout" 
    31       m.file_copy_each %w( not_found.html.erb ), "app/views/exceptions" 
     31      m.file_copy_each %w( internal_server_error.html.erb not_found.html.erb ), "app/views/exceptions" 
    3232      m.file_copy_each %w( merb.jpg ), "public/images" 
    3333      m.file_copy_each %w( master.css ), "public/stylesheets" 
  • trunk/lib/merb/dispatcher.rb

    r640 r660  
    22  class Dispatcher 
    33     
    4     DEFAULT_ERROR_TEMPLATE = Erubis::MEruby.new(File.read(File.join( 
    5         MERB_SKELETON_DIR, 'app/views/exceptions/internal_server_error.html.erb'))) 
     4    DEFAULT_ERROR_TEMPLATE = Erubis::MEruby.new((File.read(File.join( MERB_ROOT, 'app/views/exceptions/internal_server_error.html.erb')) rescue "Internal Server Error!")) 
    65         
    76    class << self 
  • trunk/lib/merb/exceptions.rb

    r640 r660  
    144144      class HTTPVersionNotSupported     < Merb::ControllerExceptions::ServerError; STATUS = 505; end 
    145145      class InternalServerError         < Merb::ControllerExceptions::ServerError; STATUS = 500 
    146         DEFAULT_TEMPLATE = Erubis::MEruby.new(File.read(File.join( 
    147             MERB_SKELETON_DIR, 'app/views/exceptions/internal_server_error.html.erb'))) 
     146        DEFAULT_TEMPLATE = ::Merb::Dispatcher::DEFAULT_ERROR_TEMPLATE 
    148147       
    149148        def initialize(exception = nil) 
  • trunk/lib/merb/mixins/render.rb

    r658 r660  
    2727    #   Merb::Template::Haml 
    2828    # 
    29     # Erubis template ext:  .herb .jerb .erb .rhtml 
     29    # Erubis template ext:  .h.erb  
    3030    # Markaby template ext: .mab 
    3131    # Builder template ext: .rxml .builder .xerb