Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7916

Show
Ignore:
Timestamp:
10/15/07 08:59:48 (11 months ago)
Author:
nzkoz
Message:

Simple changes to bring AWS up to date with view_paths and render :text. Tests still fail though. [Koz]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb

    r6037 r7916  
    4242            allowed_methods = allowed_methods.map{|m| m.to_s.upcase } 
    4343            if !allowed_methods.include?(method) 
    44               render_text("#{method} not supported", "500 #{method} not supported") 
     44              render :text => "#{method} not supported", :status=>500 
    4545              return 
    4646            end 
     
    102102                backtrace = "" 
    103103              end 
    104               render_text("Internal protocol error: #{message}#{backtrace}", "500 Internal Protocol Error") 
     104              render :text => "Internal protocol error: #{message}#{backtrace}", :status => 500 
    105105            end 
    106106          end 
     
    159159            end 
    160160          when :post 
    161             render_text('POST not supported', '500 POST not supported') 
     161            render :text => 'POST not supported', :status => 500 
    162162          end 
    163163        end 
  • trunk/actionwebservice/lib/action_web_service/scaffolding.rb

    r6180 r7916  
    110110              default_template = scaffold_path(action) 
    111111              if template_exists?(customized_template) 
    112                 content = @template.render_file(customized_template) 
     112                content = @template.render :file => customized_template 
    113113              else 
    114                 content = @template.render_file(default_template, false) 
     114                content = @template.render :file => default_template 
    115115              end 
    116116              @template.instance_variable_set("@content_for_layout", content) 
    117117              if self.active_layout.nil? 
    118                 render_file(scaffold_path("layout")
     118                render :file => scaffold_path("layout"
    119119              else 
    120                 render_file(self.active_layout, "200 OK", true) 
     120                render :file => self.active_layout 
    121121              end 
    122122            end 
  • trunk/actionwebservice/test/scaffolded_controller_test.rb

    r6180 r7916  
    66end 
    77 
    8 ActionController::Base.view_load_paths = [ '.' ] 
     8ActionController::Base.view_paths = [ '.' ] 
    99 
    1010class ScaffoldPerson < ActionWebService::Struct