Permalink
Browse files

adding to changelog

  • Loading branch information...
ryanb committed Sep 21, 2010
1 parent c11ffb6 commit 3391c5a0d747cf57f8f189cc85d01959fe2df401
Showing with 20 additions and 4 deletions.
  1. +16 −0 CHANGELOG.rdoc
  2. +3 −3 spec/cancan/ability_spec.rb
  3. +1 −1 spec/cancan/active_record_additions_spec.rb
View
@@ -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 @@
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,15 +257,15 @@
@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
@ability.can :read, B
@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 @@
# @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]

0 comments on commit 3391c5a

Please sign in to comment.