From f5c5d21681616c6b9240792092e656d3d1af385b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 27 Oct 2013 16:32:49 -0300 Subject: add an option to skip jbuilder --- railties/lib/rails/generators/app_base.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib/rails/generators/app_base.rb') diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index f9af50d5c4..41d768609d 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -47,6 +47,9 @@ module Rails class_option :skip_sprockets, type: :boolean, aliases: '-S', default: false, desc: 'Skip Sprockets files' + class_option :skip_jbuilder, type: :boolean, default: false, + desc: "Don't include jbuilder in the Gemfile" + class_option :database, type: :string, aliases: '-d', default: 'sqlite3', desc: "Preconfigure for selected database (options: #{DATABASES.join('/')})" @@ -229,6 +232,7 @@ module Rails end def jbuilder_gemfile_entry + return [] if options[:skip_jbuilder] comment = 'Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder' GemfileEntry.version('jbuilder', '~> 1.2', comment) end -- cgit v1.2.3