3
如何引用當前正在查看的對象的實例?ActiveAdmin - 如何引用當前對象?
WORKS
ActiveAdmin.register Example do
sidebar "test" do
@name = example.name
end
end
以下不起作用
ActiveAdmin.register Example do
member_action :some_stuff, :method => :put do
@name = example.name
end
end
下我如何引用對象在member_action?或者我會不得不創建另一個實例?