diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-04-04 02:43:12 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-04-04 02:43:12 +0530 |
commit | 4ac719686c0075b6ad6896becfe0f058efdb97ff (patch) | |
tree | 6255a8fc483436dc0fc89c0a2bc2755a51ecc329 /actionpack/CHANGELOG | |
parent | 4c76f6894889e8e3f5cc3722d928954c79422542 (diff) | |
parent | 3e24e9ebc22f96f9124d3a5d1c83b93c1bea937d (diff) | |
download | rails-4ac719686c0075b6ad6896becfe0f058efdb97ff.tar.gz rails-4ac719686c0075b6ad6896becfe0f058efdb97ff.tar.bz2 rails-4ac719686c0075b6ad6896becfe0f058efdb97ff.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r-- | actionpack/CHANGELOG | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index a90a7b37f7..25e2d27a01 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,52 @@ *Rails 3.1.0 (unreleased)* +* Implicit actions named not_implemented can be rendered [Santiago Pastorino] + +* Wildcard route will always matching the optional format segment by default. For example if you have this route: + + map '*pages' => 'pages#show' + + by requesting '/foo/bar.json', your `params[:pages]` will be equals to "foo/bar" with the request format of JSON. If you want the old 3.0.x behavior back, you could supply `:format => false` like this: + + map '*pages' => 'pages#show', :format => false + +* Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH] + + class PostsController < ApplicationController + USER_NAME, PASSWORD = "dhh", "secret" + + before_filter :authenticate, :except => [ :index ] + + def index + render :text => "Everyone can see me!" + end + + def edit + render :text => "I'm only accessible if you know the password" + end + + private + def authenticate + authenticate_or_request_with_http_basic do |user_name, password| + user_name == USER_NAME && password == PASSWORD + end + end + end + + ..can now be written as + + class PostsController < ApplicationController + http_basic_authenticate_with :name => "dhh", :password => "secret", :except => :index + + def index + render :text => "Everyone can see me!" + end + + def edit + render :text => "I'm only accessible if you know the password" + end + end + * Allow you to add `force_ssl` into controller to force browser to transfer data via HTTPS protocol on that particular controller. You can also specify `:only` or `:except` to specific it to particular action. [DHH and Prem Sichanugrist] * Allow FormHelper#form_for to specify the :method as a direct option instead of through the :html hash [DHH] |