1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Do not default to any Serializer

We will wait until 5.1 to make a decision
This commit is contained in:
Santiago Pastorino 2015-12-15 16:45:57 -03:00
parent 8391007b7c
commit f8edd2043e
3 changed files with 2 additions and 8 deletions

View file

@ -278,10 +278,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)
GemfileEntry.new 'jbuilder', '~> 2.0', comment, {}, options[:api]
end
def coffee_gemfile_entry

View file

@ -22,9 +22,6 @@ source 'https://rubygems.org'
# gem 'capistrano-rails', group: :development
<%- if options.api? -%>
# Use ActiveModelSerializers to serialize JSON responses
gem 'active_model_serializers', '~> 0.10.0.rc2'
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors'

View file

@ -37,9 +37,8 @@ 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)
assert_no_match(/gem 'web-console'/, content)
assert_match(/gem 'active_model_serializers'/, content)
assert_match(/# gem 'jbuilder'/, content)
end
assert_file "config/application.rb" do |content|