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:
parent
8391007b7c
commit
f8edd2043e
3 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue