Actually, either you use can :read, Post
or you use can :read, post
while looping @posts
.
There is no in between.
btw, if you use load_and_authorize_resource
, no need to add @posts = Post.all
.
They are automatically loaded.
PS: why do you check in your controller AND in your view?