diff options
4 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb index 6c9049d..ed94a8d 100644 --- a/app/controllers/refinery/blog/posts_controller.rb +++ b/app/controllers/refinery/blog/posts_controller.rb @@ -76,7 +76,7 @@ module Refinery protected def canonical? - ::Refinery.i18n_enabled? && ::Refinery::I18n.default_frontend_locale != ::Refinery::I18n.current_frontend_locale + Refinery::I18n.default_frontend_locale != Refinery::I18n.current_frontend_locale end end end diff --git a/app/views/refinery/blog/admin/categories/_form.html.erb b/app/views/refinery/blog/admin/categories/_form.html.erb index 559dbe1..f2148ea 100644 --- a/app/views/refinery/blog/admin/categories/_form.html.erb +++ b/app/views/refinery/blog/admin/categories/_form.html.erb @@ -4,7 +4,7 @@ :include_object_name => true %> <%= render "/refinery/blog/admin/shared/locale_picker", - :current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %> + :current_locale => Thread.current[:globalize_locale] %> <div class='field'> <%= f.label :title -%> diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb index 4aac811..7b63520 100644 --- a/app/views/refinery/blog/admin/posts/_form.html.erb +++ b/app/views/refinery/blog/admin/posts/_form.html.erb @@ -4,7 +4,7 @@ :include_object_name => true %> <%= render "/refinery/blog/admin/shared/locale_picker", - :current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %> + :current_locale => Thread.current[:globalize_locale] %> <div class='field'> <%= f.label :title -%> diff --git a/spec/requests/refinery/blog/posts_spec.rb b/spec/requests/refinery/blog/posts_spec.rb index a414037..9be8618 100644 --- a/spec/requests/refinery/blog/posts_spec.rb +++ b/spec/requests/refinery/blog/posts_spec.rb @@ -157,7 +157,7 @@ module Refinery describe "#show draft preview" do let(:blog_post) { FactoryGirl.create(:blog_post_draft) } - + context "when logged in as admin" do it "should display the draft notification" do visit refinery.blog_post_path(blog_post) @@ -165,9 +165,12 @@ module Refinery page.should have_content('This page is NOT live for public viewing.') end end - + context "when not logged in as an admin" do - before do + before do + # TODO: remove Refinery::Pages::Engine.load_seed dependency. + # It's here to temporary fix the issue with 404 after visiting logout path. + Refinery::Pages::Engine.load_seed visit refinery.logout_path end |