status of a redirect page is now 301 (previously 302)
This commit is contained in:
parent
2bd9e254c8
commit
55b7d4dbf2
@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
locomotive_cms (2.0.0.rc7)
|
locomotive_cms (2.0.0.rc8)
|
||||||
RedCloth (~> 4.2.8)
|
RedCloth (~> 4.2.8)
|
||||||
actionmailer-with-request (~> 0.3.0)
|
actionmailer-with-request (~> 0.3.0)
|
||||||
bson_ext (~> 1.5.2)
|
bson_ext (~> 1.5.2)
|
||||||
|
@ -11,7 +11,7 @@ module Locomotive
|
|||||||
else
|
else
|
||||||
@page = locomotive_page
|
@page = locomotive_page
|
||||||
|
|
||||||
redirect_to(@page.redirect_url) and return if @page.present? && @page.redirect?
|
redirect_to(@page.redirect_url, :status => 301) and return if @page.present? && @page.redirect?
|
||||||
|
|
||||||
render_no_page_error and return if @page.nil?
|
render_no_page_error and return if @page.nil?
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
|
|||||||
require 'action_controller/railtie'
|
require 'action_controller/railtie'
|
||||||
require 'action_mailer/railtie'
|
require 'action_mailer/railtie'
|
||||||
require 'active_resource/railtie'
|
require 'active_resource/railtie'
|
||||||
require 'sprockets/railtie'
|
# require 'sprockets/railtie'
|
||||||
|
|
||||||
# Bundler.require
|
# Bundler.require
|
||||||
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
||||||
|
@ -130,7 +130,7 @@ describe 'Locomotive rendering system' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'redirects to the redirect_url' do
|
it 'redirects to the redirect_url' do
|
||||||
@controller.expects(:redirect_to).with('http://www.example.com/').returns(true)
|
@controller.expects(:redirect_to).with('http://www.example.com/', { :status => 301 }).returns(true)
|
||||||
@controller.send(:render_locomotive_page)
|
@controller.send(:render_locomotive_page)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user