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

Changeset 201

Show
Ignore:
Timestamp:
12/17/04 00:25:32 (4 years ago)
Author:
david
Message:

Fixed a bug that would cause an ApplicationController to require itself three times and hence cause filters to be run three times [evl]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r198 r201  
     1*1.0.1* 
     2 
     3* Fixed a bug that would cause an ApplicationController to require itself three times and hence cause filters to be run three times [evl] 
     4 
     5 
    16*1.0* 
    27 
  • trunk/actionpack/lib/action_controller/dependencies.rb

    r194 r201  
    3333    #   end 
    3434    # 
    35     # Please note that a controller like ApplicationController will automatically attempt to require_dependency on a model of its name and a helper 
    36     # of its name. If nothing is found, no error is raised. This is especially useful for concrete controllers like PostController: 
     35    # Please note that a controller like ApplicationController will automatically attempt to require_dependency on a model of its  
     36    # singuralized name and a helper of its name. If nothing is found, no error is raised. This is especially useful for concrete  
     37    # controllers like PostController: 
    3738    # 
    3839    #   class PostController < ApplicationController 
     
    9596        def inherited(child) 
    9697          inherited_without_model(child) 
     98          return if child.controller_name == "application" # otherwise the ApplicationController in Rails will include itself 
    9799          begin 
    98             child.model(child.controller_name) 
    99100            child.model(Inflector.singularize(child.controller_name)) 
    100101          rescue LoadError 
  • trunk/actionpack/Rakefile

    r198 r201  
    99PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' 
    1010PKG_NAME      = 'actionpack' 
    11 PKG_VERSION   = '1.0.0' + PKG_BUILD 
     11PKG_VERSION   = '1.0.1' + PKG_BUILD 
    1212PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" 
    1313