Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 18, 2011
  1. releasing 1.6.5

Commits on May 17, 2011
  1. Merge pull request #363 from rahearn/mongoid-conditions-empty

    Fixes bug in mongoid_adapter with empty conditions hash
Commits on May 12, 2011
  1. @rahearn

    Processes can rules only if no empty conditions rules are present

    rahearn authored
    1) remove all empty conditions hashes from the rules, they are included
     in the records through `@model_class.all`
    2) only process can rules if the new and old rules lists are the same
      length (meaning there were no empty conditions hashes)
    3) always process cannot rules
Commits on May 10, 2011
  1. @rahearn

    Fixes bug in mongoid_adapter with empty conditions hash

    rahearn authored
    * adds mongoid query that matches every record when
    rule.conditions.empty? is true
Commits on May 2, 2011
  1. Merge pull request #355 from emmanuel/issue/245.

    DataMapper adapter improvements
Commits on Apr 29, 2011
  1. @emmanuel
  2. @emmanuel
  3. @emmanuel
Commits on Apr 27, 2011
  1. Merged pull request #352 from cardagin/topic/mongoid-adapter-enhancem…

    Augments Mongoid adapter by handling case where attribute is an array
Commits on Apr 25, 2011
  1. Merged pull request #343 from rahearn/mongoid-scope.

    Adds ability to use Scope query with Mongoid
Commits on Apr 15, 2011
  1. @rahearn

    Adds ability to use Scope query with Mongoid

    rahearn authored
    Same limitations apply as with active record
    * can not be OR'd with other rules for same ability/controller
Commits on Apr 1, 2011
  1. Merge branch 'optional-associations' of…

    …/cancan into socialcast-optional-associations
  2. @thatothermitch

    Fixed bug where conditions on an optionally associated object would t…

    thatothermitch authored
    …hrow exceptions if the associated object was not present at the rule match time.
  3. @flop
  4. @flop
Commits on Mar 30, 2011
  1. releasing 1.6.4

Commits on Mar 25, 2011
  1. releasing 1.6.3

  2. make sure ActiveRecord::Relation is defined before checking condition…

    …s against it so Rails 2 is supported again - closes #312
Commits on Mar 18, 2011
  1. releasing 1.6.2

  2. fixing failing MetaWhere spec

Commits on Mar 16, 2011
  1. releasing 1.6.1

  2. use instead of build_item for singleton resource so it doesn…

    …'t mess up database - closes #304
  3. making accessible_by action default to :index and parent action defau…

    …lt to :show so we don't check :read action directly - closes #302
  4. @amw

    Fixes inherited_resources collection authorization

    amw authored
    This reverts e3eab13
    I don't know what was the idea of that, but it turned out REAL bad.
    `collection` sets the collection instance variable. `resource_base` is used all
    over CanCan. It's also used inside `load_collection?` which is checked before
    `load_collection` is called. That means we actually set the collection instance
    variable through inherited_resources (without any authorization whatsoever) before trying to load it through CanCan using `accessible_by`.
        1. def load_resource
        2.  unless skip?(:load)
        3.    if load_instance?
        4.      self.resource_instance ||= load_resource_instance
        5.    elsif load_collection?
        6.      self.collection_instance ||= load_collection
        7.    end
        8.  end
        9. end
    `collection_instance` is set on line 5 instead of line 6.
Commits on Mar 11, 2011
  1. releasing 1.6.0

Commits on Mar 9, 2011
Something went wrong with that request. Please try again.