adding to changelog
This commit is contained in:
parent
c11ffb6fd1
commit
3391c5a0d7
|
@ -1,5 +1,21 @@
|
|||
1.4.0 (not yet released)
|
||||
|
||||
* The :through option will now call a method with that name if instance variable doesn't exist - see issue #146
|
||||
|
||||
* Adding :shallow option to load_resource to bring back old behavior of fetching a child without a parent
|
||||
|
||||
* Raise AccessDenied error when loading a child and parent resource isn't found
|
||||
|
||||
* Abilities defined on a module will apply to anything that includes that module - see issue #150 and #152
|
||||
|
||||
* Abilities can be defined with a string of SQL in addition to a block so accessible_by works with a block - see issue #150
|
||||
|
||||
* Adding etter support for InheritedResource - see issue #23
|
||||
|
||||
* Loading the collection instance variable with accessible_by - see issue #137
|
||||
|
||||
* Adding action and subject variables to I18n unauthorized message - closes #142
|
||||
|
||||
* Adding check_authorization and skip_authorization controller class methods to ensure authorization is performed (thanks justinko) - see issue #135
|
||||
|
||||
* Setting initial attributes based on ability conditions in new/create actions - see issue #114
|
||||
|
|
|
@ -23,7 +23,7 @@ describe CanCan::Ability do
|
|||
end
|
||||
@ability.can?(:read, :some_symbol).should == true
|
||||
end
|
||||
|
||||
|
||||
it "should pass nil to a block when no instance is passed" do
|
||||
@ability.can :read, Symbol do |sym|
|
||||
sym.should be_nil
|
||||
|
@ -257,7 +257,7 @@ describe CanCan::Ability do
|
|||
@ability.can?(:read, 1..5).should be_false
|
||||
@ability.can?(:read, Range).should be_true
|
||||
end
|
||||
|
||||
|
||||
it "should allow to check ability for Module" do
|
||||
module B; end
|
||||
class A; include B; end
|
||||
|
@ -265,7 +265,7 @@ describe CanCan::Ability do
|
|||
@ability.can?(:read, A).should be_true
|
||||
@ability.can?(:read, A.new).should be_true
|
||||
end
|
||||
|
||||
|
||||
it "should pass nil to a block for ability on Module when no instance is passed" do
|
||||
module B; end
|
||||
class A; include B; end
|
||||
|
|
|
@ -48,7 +48,7 @@ describe CanCan::ActiveRecordAdditions do
|
|||
# @ability.associations_hash(:read, @model_class).should == [{:too => [:far]}, :foo]
|
||||
@model_class.accessible_by(@ability).should == :found_records
|
||||
end
|
||||
|
||||
|
||||
it "should allow to define sql conditions by not hash" do
|
||||
@ability.can :read, @model_class, :foo => 1
|
||||
@ability.can :read, @model_class, ['bar = ?', 1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user