diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-04-20 12:28:23 -0400 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:12 -0300 |
commit | 98a9936228f8a9485131b58a728aaae5ed2dde42 (patch) | |
tree | 62a0476912d3e03dbb0ab7a2fc69c73ac63d32fe /railties | |
parent | decc4e8f82c11c71068aa513db7f17268650f7c3 (diff) | |
download | rails-98a9936228f8a9485131b58a728aaae5ed2dde42.tar.gz rails-98a9936228f8a9485131b58a728aaae5ed2dde42.tar.bz2 rails-98a9936228f8a9485131b58a728aaae5ed2dde42.zip |
config.api_only = true implies config.generators.api_only = true
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 9 | ||||
-rw-r--r-- | railties/test/application/generators_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/rake_test.rb | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 6ffbb1b204..4fc7a1db62 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -13,10 +13,10 @@ module Rails :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :ssl_options, :static_cache_control, :static_index, :session_options, :time_zone, :reload_classes_only_on_change, - :beginning_of_week, :filter_redirect, :api_only, :x + :beginning_of_week, :filter_redirect, :x attr_writer :log_level - attr_reader :encoding + attr_reader :encoding, :api_only def initialize(*) super @@ -61,6 +61,11 @@ module Rails end end + def api_only=(value) + @api_only = value + generators.api_only = value + end + def paths @paths ||= begin paths = super diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 36298f2385..ed8daa52fc 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -128,7 +128,7 @@ module ApplicationTests test "api only generators hide assets, helper, js and css namespaces and set api option" do add_to_config <<-RUBY - config.generators.api_only = true + config.api_only = true RUBY # Initialize the application diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 3682c6c9d5..a839a0b9b6 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -197,7 +197,6 @@ module ApplicationTests def test_api_scaffold_tests_pass_by_default add_to_config <<-RUBY config.api_only = true - config.generators.api_only = true RUBY app_file "app/controllers/application_controller.rb", <<-RUBY |