Fix activity route generation. Workaround for resolve/refinerycms#1193.
This commit is contained in:
parent
4a8a46ccc7
commit
edfa8b81e7
2 changed files with 22 additions and 1 deletions
|
@ -13,7 +13,13 @@ module Refinery
|
||||||
plugin.url = app.routes.url_helpers.refinery_admin_blog_posts_path
|
plugin.url = app.routes.url_helpers.refinery_admin_blog_posts_path
|
||||||
plugin.menu_match = /refinery\/blog\/?(posts|comments|categories)?/
|
plugin.menu_match = /refinery\/blog\/?(posts|comments|categories)?/
|
||||||
plugin.activity = {
|
plugin.activity = {
|
||||||
:class_name => :'refinery/blog/post'
|
:class_name => :'refinery/blog/post',
|
||||||
|
|
||||||
|
# Workaround bug #1193 in refinerycms.
|
||||||
|
# Without this line, the route fragment generated by the Refinery's
|
||||||
|
# activity dashboard would be refinery_blog_admin_blog_posts_path,
|
||||||
|
# which does not exist.
|
||||||
|
:url => "refinery_admin_blog_posts_path"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
15
spec/lib/refinery/blog/engine_spec.rb
Normal file
15
spec/lib/refinery/blog/engine_spec.rb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
describe Engine do
|
||||||
|
let(:activity) do
|
||||||
|
Refinery::Plugins.registered.find_by_name("refinerycms_blog").activity.first
|
||||||
|
end
|
||||||
|
|
||||||
|
it "sets the correct path for activity entries" do
|
||||||
|
activity.url.should eq("edit_refinery_admin_blog_posts_path")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue