ryanb/cancan — Issue #572: allowing edit and view only some fields
Author: ricardopacheco
Created: 2012-03-06 14:19:28+00:00
State: open

if user.role == "admin"
can :manage, :all
elsif user.role == "deposito"
can [:read, :create], Mapa, Mapa.where("field1", "field2")
can :update, Mapa, Mapa.where("field1", "field2")
cannot :destroy, :all
end

not working, how do?