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

Changeset 8009

Show
Ignore:
Timestamp:
10/24/07 04:47:40 (7 months ago)
Author:
bitsweat
Message:

Remove unnecessary returns from builtin filters since render/return is now sufficient. Closes #9952 [Josh Peek]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/filters.rb

    r7984 r8009  
    762762        @before_filter_chain_aborted = true 
    763763        logger.info "Filter chain halted as [#{filter.inspect}] #{reason}." if logger 
    764         false 
    765764      end 
    766765    end 
  • trunk/actionpack/lib/action_controller/http_authentication.rb

    r7719 r8009  
    9494 
    9595      def authenticate(controller, &login_procedure) 
    96         if authorization(controller.request).blank? 
    97           false 
    98         else 
     96        unless authorization(controller.request).blank? 
    9997          login_procedure.call(*user_name_and_password(controller.request)) 
    10098        end 
     
    123121        controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.gsub(/"/, "")}") 
    124122        controller.send! :render, :text => "HTTP Basic: Access denied.\n", :status => :unauthorized 
    125         return false 
    126123      end 
    127124    end 
  • trunk/actionpack/lib/action_controller/verification.rb

    r7719 r8009  
    9999          redirect_to(options[:redirect_to]) if options[:redirect_to] 
    100100        end 
    101         return false 
    102101      end 
    103  
    104       true 
    105102    end 
    106103    private :verify_action 
  • trunk/actionpack/test/controller/flash_test.rb

    r7428 r8009  
    7171      redirect_to :action => "std_action" 
    7272      @flash_copy = {}.update(flash) 
    73       false 
    7473    end 
    7574  end