如何为具有选项子属性的模型创建路由?假设我正在创建一个帮助台应用程序,并且工单可以与客户之前向我订购的订单相关联,也可以与他们尚未订购的目录中的项目相关联。
class CustomerServiceTicket
belongs_to :order
belongs_to :item
belongs_to :buyer
belongs_to :customer_service_category
end
class Order
...
has_one :customer_service_ticket
...
end
class Item
...
has_on
我正在编写google 3代码,这里:首先调用两个Fusiontable来显示在地图上,然后在地图之外创建一个html元素,当单击该元素时,应该打开以前在Fusiontable中创建的自定义in。因此,当我单击html元素时,我不知道如何创建一个函数,该函数将调用从fusiontables中已经创建的infowindow。所以我想要这个效果的,但是我的应该从已经存在的融合表中调用定制的infowindow。怎么做?
谢谢大家!
更新
谢谢你的回复埃里克。我不知道,我试着用这样的函数:
function izbor() {
var infowindow = new google.maps.Inf