diff --git a/app/models/cms/attachment.rb b/app/models/cms/attachment.rb index 16a31ac84..ad2f42e3b 100644 --- a/app/models/cms/attachment.rb +++ b/app/models/cms/attachment.rb @@ -188,8 +188,6 @@ def path(style_name = configuration.default_style) data.path(style_name) end - alias :full_file_location :path - def original_filename data_file_name end diff --git a/test/dummy/config/environments/production.rb b/test/dummy/config/environments/production.rb index 5722d1476..d6dae59de 100644 --- a/test/dummy/config/environments/production.rb +++ b/test/dummy/config/environments/production.rb @@ -11,7 +11,7 @@ config.action_controller.perform_caching = true # Allows the CMS to use a single domain (with no caching or redirects). - config.cms.use_single_domain = false + config.cms.use_single_domain = true # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false diff --git a/test/unit/behaviors/attaching_test.rb b/test/unit/behaviors/attaching_test.rb index 9c469d8c0..8ac107369 100644 --- a/test/unit/behaviors/attaching_test.rb +++ b/test/unit/behaviors/attaching_test.rb @@ -474,7 +474,7 @@ def test_updating_the_attachment_file_name @attachable.attachments[0].data = @file @attachable.save! - assert_equal file_contents(@file.path), file_contents(@attachable.attachments[0].full_file_location) + assert_equal file_contents(@file.path), file_contents(@attachable.attachments[0].path) end end @@ -553,8 +553,8 @@ def setup test "Keep older versions of files" do file2 = update_file_for_attachable - assert_equal file_contents(@file.path), file_contents(@attachable.as_of_version(1).attachments[0].full_file_location), "The contents of version 1 of the file should be returned" - assert_equal file_contents(file2.path), file_contents(@attachable.as_of_version(2).attachments[0].full_file_location) + assert_equal file_contents(@file.path), file_contents(@attachable.as_of_version(1).attachments[0].path), "The contents of version 1 of the file should be returned" + assert_equal file_contents(file2.path), file_contents(@attachable.as_of_version(2).attachments[0].path) end test "Deleting an attachment does not increment the version # of the block" do