0
JSON響應我有一個簡單的方法如何使用Rails的
def country_list
@countries = User.find(:all).map(&:country).uniq
render :json => @countries
end
,如果它的路徑是country_list_path
,我怎麼可以使用響應作爲例如自動完成源列表,或者只顯示?
如果我把任何地方country_list_path
我會得到的網址,而不是響應