Module: Cabot::Index
- Defined in:
- lib/cabot.rb
Overview
GET
Class Method Summary collapse
Class Method Details
.call(model, current_user = {}, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/cabot.rb', line 8 def self.call(model, current_user = {}, = {}) object = model.to_s.camelize.constantize params = Cabot::Parameters::Index.send(model) .each do |key, value| params[key] = value end Factory.new(object::Index.(params, current_user: current_user)) end |