I know how to restrict access for RESTful applications with CanCan in Rails 5.
Some of my actions and controllers are not RESTful.
For example I have a report_controller with a user_report method. There is no model directly linked to this controller/action.
class ReportController < ApplicationController
load_and_authorize_resource
def user_report
end
end
How can I define an ability in my ability.rb file to restrict access to this action?