diff options
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r-- | actionpack/CHANGELOG.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index aa4872f3ac..9db30c8cf7 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,5 +1,62 @@ ## Rails 4.0.0 (unreleased) ## +* Rename all action callbacks from *_filter to *_action to avoid the misconception that these + callbacks are only suited for transforming or halting the response. With the new style, + it's more inviting to use them as they were intended, like setting shared ivars for views. + + Example: + + class PeopleController < ActionController::Base + before_action :set_person, except: [ :index, :new, :create ] + before_action :ensure_permission, only: [ :edit, :update ] + + ... + + private + def set_person + @person = current_account.people.find(params[:id]) + end + + def ensure_permission + current_person.can_change?(@person) + end + end + + The old *_filter methods still work with no deprecation notice. + + *DHH* + +* Add :if / :unless conditions to fragment cache: + + <%= cache @model, if: some_condition(@model) do %> + + *Stephen Ausman + Fabrizio Regini* + +* Add filter capability to ActionController logs for redirect locations: + + config.filter_redirect << 'http://please.hide.it/' + + *Fabrizio Regini* + +* Fixed a bug that ignores constraints on a glob route. This was caused because the constraint + regular expression is overwritten when the `routes.rb` file is processed. Fixes #7924 + + *Maura Fitzgerald* + +* More descriptive error messages when calling `render :partial` with + an invalid `:layout` argument. + #8376 + + render :partial => 'partial', :layout => true + + # results in ActionView::MissingTemplate: Missing partial /true + + *Yves Senn* + +* Sweepers was extracted from Action Controller as `rails-observers` gem. + + *Rafael Mendonça França* + * Add option flag to `CacheHelper#cache` to manually bypass automatic template digests: <% cache project, skip_digest: true do %> |