回答
這似乎是一個全面的列表
http://edgeguides.rubyonrails.org/active_support_instrumentation.html#render_partial- ACTION_VIEW
配置/初始化/ notifications.rb
ActiveSupport::Notifications.subscribe "process_action.action_controller" do |name, start, finish, id, payload|
PageRequest.create! do |page_request|
page_request.path = payload[:path]
page_request.page_duration = (finish - start) * 1000
page_request.view_duration = payload[:view_runtime]
page_request.db_duration = payload[:db_runtime]
end
end
更多信息here
但是,當使用字符串或正則表達式有隻是幾個例子,我想問的是有可用的通知的完整列表 – 2012-04-02 10:50:55
@說,你能告訴一些關於http://stackoverflow.com/questions/146650 16/rails-activesupport-notifications-wrong-db-runtime-value? – Fivell 2013-02-05 16:59:49
我一直在尋找同樣的事情。看起來沒有關於此的文檔,所以我瀏覽了代碼並編譯了以下列表。
注意,===
運算符用於匹配,這樣你就可以訂閱
receive.action_mailer
deliver.action_mailer
write_fragment.action_controller
read_fragment.action_controller
exist_fragment?.action_controller
expire_fragment.action_controller
expire_page.action_controller
write_page.action_controller
start_processing.action_controller
process_action.action_controller
send_file.action_controller
send_data.action_controller
redirect_to.action_controller
halted_callback.action_controller
render_collection.action_view
render_partial.action_view
render_template.action_view
!render_template.action_view
sql.active_record
cache_read.active_support
cache_fetch_hit.active_support
cache_generate.active_support
cache_write.active_support
cache_delete.active_support
cache_exist?.active_support
deprecation.rails
render
感謝這個 – 2012-04-21 18:54:39
- 1. Rails 3通知
- 2. Rails 3 Flash通知樣式
- 3. Rails 3 has_many通過3表
- 4. Rails 3消費'非標準'REST API
- 5. 標準ML:通過列表搜索
- 6. Rails 3異常通知錯誤
- 7. Rails 3:系統通知的策略
- 8. Rails 3 - 設計用戶不清除通知標記
- 9. Rails的通知表問題
- 10. Rails 3:Link_to列表項?
- 11. Rails - 3列關聯表?
- 12. Rails 3郵件列表
- 13. Excel中的3個標準的Sumifs列
- 14. Rails 3 - 更新3列連接表
- 15. 列表框通知
- 16. C++ MPI標準3
- 17. 通知標記具有值-3
- 18. Hibernate的標準加入3個表
- 19. 加入3表格與哪裏標準
- 20. 標準ActiveXObject參考列表
- 21. 標準Java合同列表
- 22. Hibernate的標準列表
- 23. Java標準化列表
- 24. 笨3:未知列在「字段列表」
- 25. 的findall/3的子列表符合一定標準的
- 26. 如何在3個標準之後對列表進行排序?
- 27. 的Rails 3:標準的資源混合航線「通用」控制器路線
- 28. 在Rails 3中標記3
- 29. 從通知列表中刪除持久通知(通知API)
- 30. Rails 3:未知屬性
非常感謝你:)這就是它! – 2012-05-09 10:24:52