I need to hide some form fields in a form when a user is not a certain role. How could that be done? From the docs I know you can give access to certain actions like show, update or just manage
But how to do something like if user.role? :admin
if cannot? :manage ,Articles
flash[:notice] = "you are not authorized to manage articles"
end