我對項目使用ActiveAdmin。我有和我有一個自定義窗體的部分。我希望能夠使這個自定義窗體時,在用戶點擊按鈕,所以這是我做過什麼:在ActiveAdmin的「自定義頁面」中呈現自定義編輯部分
ActiveAdmin.register_page "Messages" do
menu priority: 5
welcome_message = Template.first
page_action :update, method: :put do
#update code
end
page_action :edit, :method => :get do
render partial:'custom_form', locals: { settings: welcome_message }
end
action_item do
link_to "Edit", admin_welcome_messages_edit_path, :method => :get
end
content do
render text: "HI"
end
end
這工作,但問題是,我的形式得到不ActiveAdmin的佈局和樣式呈現它只是將我的custom_form
顯示爲一個乾淨的html。
如果我在content do ... end
中渲染我的custom_form
它確實有效,但我需要這個來展示不同的東西。
任何幫助?我不知道還有什麼可以嘗試的,我已經達到了谷歌的前3頁沒有成功!
這沒有奏效,它說它找不到佈局。 – Andres 2014-10-08 12:30:47