mercredi 8 avril 2015

How to call a Rails Mountable Engine method from a Rails application?

Muntable Engine Controller Method:



module ServiceApi
module Api
module V1
class RequestorController < ApplicationController
def get_details(query_parameters)
#some code here
end
end
end
end
end


Application Controller Calling the get_details(params) method from the Mountable Engine



ServiceApi::Api::V1::RequestorController.new.get_details(params)

Aucun commentaire:

Enregistrer un commentaire