diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-04-20 20:12:43 -0400 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:12 -0300 |
commit | 3d3730040dba728912a42cd6a571042833f93cee (patch) | |
tree | cf593955f6e02684f07cbe87fff4d68ddb949438 /railties | |
parent | 7d17269be3ff1427c63b645f50a07c012cad6e4b (diff) | |
download | rails-3d3730040dba728912a42cd6a571042833f93cee.tar.gz rails-3d3730040dba728912a42cd6a571042833f93cee.tar.bz2 rails-3d3730040dba728912a42cd6a571042833f93cee.zip |
Disable jbuilder for Rails API apps, meanwhile it doesn't play nicely
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/api_app_generator_test.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index c02b39d203..249fe96772 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -266,6 +266,8 @@ module Rails end def jbuilder_gemfile_entry + return [] if options[:api] + comment = 'Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder' GemfileEntry.version('jbuilder', '~> 2.0', comment) end diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index ff70729110..fc4c101309 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -37,6 +37,7 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase assert_no_match(/gem 'coffee-rails'/, content) assert_no_match(/gem 'jquery-rails'/, content) assert_no_match(/gem 'sass-rails'/, content) + assert_no_match(/gem 'jbuilder'/, content) end assert_file "config/application.rb" do |content| |