Skip to content
Snippets Groups Projects
Commit f919ac53 authored by Ryan Bates's avatar Ryan Bates
Browse files

releasing gem v1.0.1

parent 021f33c9
No related branches found
No related tags found
No related merge requests found
1.0.1 (Dec 14, 2009)
* Adding :class option to load_resource so one can customize which class to use for the model - see issue #17 * Adding :class option to load_resource so one can customize which class to use for the model - see issue #17
* Don't fetch parent of nested resource if *_id parameter is missing so it works with shallow nested routes - see issue #14 * Don't fetch parent of nested resource if *_id parameter is missing so it works with shallow nested routes - see issue #14
......
...@@ -65,11 +65,7 @@ Setting this for every action can be tedious, therefore the load_and_authorize_r ...@@ -65,11 +65,7 @@ Setting this for every action can be tedious, therefore the load_and_authorize_r
If the user authorization fails, a CanCan::AccessDenied exception will be raised. You can catch this and modify its behavior in the ApplicationController. If the user authorization fails, a CanCan::AccessDenied exception will be raised. You can catch this and modify its behavior in the ApplicationController.
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
rescue_from CanCan::AccessDenied, :with => :access_denied rescue_from CanCan::AccessDenied do |exception|
protected
def access_denied
flash[:error] = "Sorry, you are not allowed to access that page." flash[:error] = "Sorry, you are not allowed to access that page."
redirect_to root_url redirect_to root_url
end end
......
...@@ -4,8 +4,8 @@ Gem::Specification.new do |s| ...@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
s.description = "Simple authorization solution for Rails which is completely decoupled from the user's roles. All permissions are stored in a single location for convenience." s.description = "Simple authorization solution for Rails which is completely decoupled from the user's roles. All permissions are stored in a single location for convenience."
s.homepage = "http://github.com/ryanb/cancan" s.homepage = "http://github.com/ryanb/cancan"
s.version = "1.0.0" s.version = "1.0.1"
s.date = "2009-12-13" s.date = "2009-12-14"
s.authors = ["Ryan Bates"] s.authors = ["Ryan Bates"]
s.email = "ryan@railscasts.com" s.email = "ryan@railscasts.com"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment