User.new can :destroy, Post, user_id: user.id end end # app/controllers/posts_controller.rb class PostsController < ApplicationController before_filter :authenticate_user! load_and_authorize_resource # app/views/posts/edit.erb <% if can? :destroy, @user %> <%= link_to 'আ', posts, method: :delete %> <% end %>