Skip to content

Commit

Permalink
Remove old asset_path from rails config
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 15, 2012
1 parent 3db6990 commit 7dba159
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
1 change: 0 additions & 1 deletion actionmailer/lib/action_mailer/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Railtie < Rails::Railtie # :nodoc:
options.queue ||= app.queue

# make sure readers methods get compiled
options.asset_path ||= app.config.asset_path
options.asset_host ||= app.config.asset_host
options.relative_url_root ||= app.config.relative_url_root

Expand Down
6 changes: 1 addition & 5 deletions railties/lib/rails/application/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Rails
class Application
class Configuration < ::Rails::Engine::Configuration
attr_accessor :asset_host, :asset_path, :assets, :autoflush_log,
attr_accessor :asset_host, :assets, :autoflush_log,
:cache_classes, :cache_store, :consider_all_requests_local, :console,
:eager_load, :exceptions_app, :file_watcher, :filter_parameters,
:force_ssl, :helpers_paths, :logger, :log_formatter, :log_tags,
Expand Down Expand Up @@ -64,10 +64,6 @@ def initialize(*)
@assets.logger = nil
end

def compiled_asset_path
"/"
end

def encoding=(value)
@encoding = value
silence_warnings do
Expand Down
20 changes: 0 additions & 20 deletions railties/test/application/configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ def teardown
assert AppTemplate::Application, AppTemplate::Application.config.eager_load_namespaces
end

test "asset_path defaults to nil for application" do
require "#{app_path}/config/environment"
assert_equal nil, AppTemplate::Application.config.asset_path
end

test "the application can be eager loaded even when there are no frameworks" do
FileUtils.rm_rf("#{app_path}/config/environments")
add_to_config <<-RUBY
Expand Down Expand Up @@ -441,21 +436,6 @@ def index
end
end

test "config.asset_path is not passed through env" do
make_basic_app do |app|
app.config.asset_path = "/omg%s"
end

class ::OmgController < ActionController::Base
def index
render :inline => "<%= image_path('foo.jpg') %>"
end
end

get "/"
assert_equal "/omg/images/foo.jpg", last_response.body
end

test "config.action_view.cache_template_loading with cache_classes default" do
add_to_config "config.cache_classes = true"
require "#{app_path}/config/environment"
Expand Down

0 comments on commit 7dba159

Please sign in to comment.