resolve/refinerycms — Issue #1145: activity.url can't handle new namespaces for blog engine 
Author: syelle
Created: 2011-11-19 01:17:07+00:00
State: open

Recently, refinerycms-blog [was refactored](https://github.com/resolve/refinerycms-blog/commit/36c005ecd112b76d3c9c2d7092f22d6e06755d73) such that all blog elements now live under the Refinery::Blog namespace (such as Refinery::Blog::Post). This broke the "latest activity" view on the Refinery Dashboard.

[dashboard/app/helpers/refinery/admin/dashboard_helper.rb](https://github.com/resolve/refinerycms/blob/master/dashboard/app/helpers/refinery/admin/dashboard_helper.rb) makes a call to activity.url on [line 19](https://github.com/resolve/refinerycms/blob/master/dashboard/app/helpers/refinery/admin/dashboard_helper.rb#L19).

[activity.rb](https://github.com/resolve/refinerycms/blob/master/core/lib/refinery/activity.rb#L96) calls [base_class_name](https://github.com/resolve/refinerycms/blob/master/core/lib/refinery/activity.rb#L70), which demodulizes the class name (changing it from 'Refinery::Blog::Post' to 'Post').

The latest activity panel uses this new class name to build the action to which it should link. In the case of a new blog post, it is trying to link to the edit_refinery_admin_post_path route, which no longer exists. It should be linking to edit_refinery_admin_blog_post_path (which does exist, but isn't what activity.url generates).