可安装发动机控制器方法:
module ServiceApi
module Api
module V1
class RequestorController < ApplicationController
def get_details(query_parameters)
#some code here
end
end
end
end
end
Run Code Online (Sandbox Code Playgroud)
Rails app Controller get_details(params)
从可安装引擎调用方法
ServiceApi::Api::V1::RequestorController.new.get_details(params)
Run Code Online (Sandbox Code Playgroud) ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.2 ruby-on-rails-4