releasing gem v1.0.1
This commit is contained in:
parent
021f33c9a0
commit
f919ac53bb
|
@ -1,3 +1,5 @@
|
||||||
|
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
|
||||||
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|
|
||||||
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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user