-
I am trying out CanCan 2.0 for the first time, in order to use ollym's fork for strong parameters.
My controller is namespaced Builder::ContactsController. So in my Ability:
```
can [:index, :show],…
-
Firstly, thank you for this awesome gem! Its implementation is so easy compared to others I have tried!
I have a User resource that I have applied a hash condition on. I also have a :report resource …
-
I have just added the 2.0 version of the gem into my rails app and noticed that
```
if can? [:update, :destroy], :users
```
which used to work fine in 1.6.8 now causes the error:
```
undefined me…
-
Example: A user can manage itself, is implemented like this:
```
can :manage, User do |u|
u.id==user.id
end
```
However, the query
```
can?(:create, User)
```
is ALWAYS responded with "t…
ghost updated
10 years ago
-
ability.rb:
can :manage, Customer, :team=>{:id=>user.team_ids}
controller / update method:
@customers = Customer.accessible_by(current_ability).find(params[:id])
result:
ActiveRecord::ReadOnlyRecor…
-
Hello,
I have a requirement :-
In user.rb I have :- has_many :permissions
User has roles as well as permissions. So one role can have multiple permissions.
Here my Role is "Admin". Admin can have mu…
-
I have some troubles with cancan and mongoid
(sorry, I am a Newbie)
undefined method `reflect_on_association' for "4ff484be34257be50d00000a":String
My Model (self referencing):
class Musicstyle
…
-
Are there any plans to support Ohm?
Ohm is a library for storing objects in Redis, a persistent key-value database. It includes an extensible list of validations and has very good performance.
-
I've got a strange case where an object is reported as not accessible, but should be (according to `accessible_by`). I tested this using the following lines which should be self-descriptive (byebug in…
-
I have a Comment model which `belongs_to :commentable, polymorphic: true` association. I'm wondeirng how to setup the controller, here's what I have to far:
``` ruby
class CommentsController < APICo…