我在控制器中有以下代码
def show
client = GameAccounts::GameAccountsClient.new
..
json = client.get_accounts( ..)
..
end
我在 GameAccountsClient 中有以下代码
def get_accounts(..)
response = query_account(CGI.escape(params[:name])
JSON.parse(response.body)
end
我有上面的代码,但我不确定在控制器中调用 get_accounts 方法时如何传递 params[:name]。任何人都可以帮助我在 rails 中传递哈希方法吗?。谢谢