Inject method through concerns using conditions

11 views
Skip to first unread message

Cezinha Anjos

unread,
Dec 25, 2014, 6:20:57 PM12/25/14
to rubyonra...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages