CHANGELOG

Path: vendor/actionpack/CHANGELOG
Last Update: Fri Aug 06 14:53:13 CEST 2004

*0.7.9*

  • The "form" method now present boolean fields from PostgreSQL as drop-down menu. [Scott]
  • Scaffolding now automatically attempts to require the class that’s being scaffolded.
  • Scaffolding will use the current active layout, instead of its own, if one has been specified. Example:
      class WeblogController < ActionController::Base
        layout "layouts/weblog"
        scaffold :post
      end
    

    [Suggested by Scott]

  • Changed url_for (and all the that drives, like redirect_to, link_to, link_for) so you can pass it a symbol instead of a hash. This symbol is a method reference which is then called to calculate the url. Example:
      class WeblogController < ActionController::Base
        def update
          # do some update
          redirect_to :dashboard_url
        end
    
        protected
          def dashboard_url
            if @project.active?
              url_for :controller => "project", :action => "dashboard"
            else
              url_for :controller => "account", :action => "dashboard"
            end
          end
      end
    
  • Added default_url_options to specialize behavior for all url_for (and friends) calls:
      Overwrite to implement a number of default options that all url_for-based methods will use.
      The default options should come in form of a hash, just like the one you would use for
      url_for directly. Example:
    
        def default_url_options(options)
          { :controller_prefix => @project.active? ? "projects/" : "accounts/" }
        end
    
      As you can infer from the example, this is mostly useful for situations where you want to
      centralize dynamic dissions about the urls as they stem from the business domain. Please note
      that any individual url_for call can always override the defaults set by this method.
    
  • Changed url_for so that an "id" passed in the :params is not treated special. You need to use the dedicated :id to get the special auto path-params treatment. Considering the url localhost:81/friends/list
      url_for(:action => "show", :params => { "id" => 5 })
        ...used to give http://localhost:81/friends/show/5
        ......now gives http://localhost:81/friends/show?id=5
    
      If you want the automated id behavior, do:
    
      url_for(:action => "show", :id => 5 )
        ....which gives http://localhost:81/friends/show/5
    
  • Fixed problem with anchor being inserted before path parameters with url_for (and friends)

*0.7.8*

  • Fixed session bug where you couldn’t store any objects that didn’t exist in the standard library (such as Active Record objects).
  • Added reset_session method for Action Controller objects to clear out all objects in the session.
  • Fixed that exceptions raised during filters are now also caught by the default rescues
  • Added new around_filter for doing before and after filtering with a single object [Florian Weber]:
      class WeblogController < ActionController::Base
        around_filter BenchmarkingFilter.new
    
        # Before this action is performed, BenchmarkingFilter#before(controller) is executed
        def index
        end
        # After this action has been performed, BenchmarkingFilter#after(controller) is executed
      end
    
      class BenchmarkingFilter
        def initialize
          @runtime
        end
    
        def before
          start_timer
        end
    
        def after
          stop_timer
          report_result
        end
      end
    
  • Added the options for specifying a different name and id for the form helper methods than what is guessed [Florian Weber]:
      text_field "post", "title"
        ...just gives: <input id="post_title" name="post[title]" size="30" type="text" value="" />
    
      text_field "post", "title", "id" => "title_for_post", "name" => "first_post_title"
        ...can now give: <input id="title_for_post" name="first_post_title" size="30" type="text" value="" />
    
  • Added DebugHelper with a single "debug" method for doing pretty dumps of objects in the view (now used in the default rescues to better present the contents of session and template variables)
  • Added note to log about the templates rendered within layouts (before just the layout was shown)
  • Fixed redirects on https setups [Andreas]
  • Fixed scaffolding problem on the edit action when using :suffix => true [Scott]
  • Fixed scaffolding problem where implementing list.rhtml wouldn’t work for the index action
  • URLs generated now uses &amp; instead of just & so pages using it can validate with W3C [Spotted by Andreas]

*0.7.7*

  • Fixed bug in CGI extension that prevented multipart forms from working

*0.7.6*

  • Included ERB::Util so all templates can easily escape HTML content with <%=h @person.content %>
  • All requests are now considered local by default, so everyone will be exposed to detailed debugging screens on errors. When the application is ready to go public, set ActionController::Base.consider_all_requests_local to false, and implement the protected method local_request? in the controller to determine when debugging screens should be shown.
  • Fixed three bugs with the url_for/redirect_to/link_to handling. Considering the url localhost:81/friends/show/1
      url_for(:action => "list")
        ...used to give http://localhost:81/friends/list/1
        ......now gives http://localhost:81/friends/list
    
      url_for(:controller => "friends", :action => "destroy", :id => 5)
        ...used to give http://localhost:81/friends/destroy
        ......now gives http://localhost:81/friends/destroy/5
    

    Considering the url localhost:81/teachers/show/t

      url_for(:action => "list", :id => 5)
        ...used to give http://localhost:81/5eachers/list/t
        ......now gives http://localhost:81/teachers/list/5
    

    [Reported by David Morton & Radsaq]

  • Logs exception to logfile in addition to showing them for local requests
  • Protects the eruby load behind a begin/rescue block. eRuby is not required to run ActionController.
  • Fixed install.rb to also install clean_logger and the templates
  • Added ActiveRecordStore as a session option. Read more in lib/action_controller/session/active_record_store.rb [Tim Bates]
  • Change license to MIT License (and included license file in package)
  • Application error page now returns status code 500 instead of 200
  • Fixed using Procs as layout handlers [Florian Weber]
  • Fixed bug with using redirects ports other than 80
  • Added index method that calls list on scaffolding

*0.7.5*

  • First public release

[Validate]