Inject method through concerns using conditions

Hi! Are you ok? I wish yes…

Is it possible create a controller’s concern which I can choose the methods that I’d like to inject in the destination class?

For example:

class MyController < ApplicationController

include DatasetableController

dataset for_model: Invoice, only: [:index]

end

I have developed the DatasetableController RESTfull, now I’d like to choose which verbs a controller will respond.

Is it possible?

Thanks