-
Ve folio je CanCanCan, ale views ho nevyužívají naplno. Například zobrazení tlačítka " +Add" pro `Folio::User` by se mělo řídit `if can?(:create, Folio::User)`
Když jsem zkusil v `main_app` nasta…
foton updated
2 years ago
-
I know you can check abilities in "server side" views (erb) using the can? method.
What if the views are rendered on the client using a Javascript template engine (say ejs)? In such case the can? is n…
-
When I write a rule that involves a scope, like
``` ruby
class Ability
def initialize(user)
can :frobble, Bucket, Bucket.frobbleable_by(user)
end
end
```
it seems CanCan stores the results o…
-
I have these classes
```
class Press
has_many :books
end
class Book
belongs_to :press
end
class Permission
belongs_to :book
end
```
I'm defining this ability:
```
can :manage, Permission, :…
-
I use mongoid 3 and cancan 1.6.7. Everything works great except checking the index actions. The only difference from the "standard" implementation is that roles are stored as an array in the user mode…
rutte updated
10 years ago
-
On the employers index, each employer is accompanied by links to edit or delete it. Refactor these so that they are generated by a single method that takes the employer as an argument.
The method …
-
-
Hola! Les dejo las gemas permitidas a lo largo del proyecto. Cualquier duda de gema pregúntenla en un comentario de esta issue. Iré actualizando la lista a medida que se agreguen nuevas gemas.
Para…
-
Hi,
I'd like to put the following on the wishlist: a Parameter to enable block evaluation on classes.
Reason: I have a Poll model with many Votes, the authorization for a Vote :create action are pur…
-
I'm trying to load the resources using either load_resource or load_and_authorize_resource, but it doesn't seem to load the resource at all. I keep getting errors in my rspec controller test that @com…