所以我在下面的模型結構 class Product < AR
belongs_to :buyable, :polymorphic => true, :inverse_of => :product
end
class Stone < AR
has_one :product, :as => :buyable, :inverse_of => :buyable
acce
我想向我的rails_admin模型編輯窗格添加一個按鈕,該按鈕可以做我想做的事(自動發佈到Facebook)。我說: field :post_to_facebook do
formatted_value do
bindings[:view].post_event_to_facebook bindings[:object]
end
end
而且我有這個幫手實際創