railties 3.2.22.5 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +186 -78
- data/README.rdoc +4 -2
- data/lib/rails.rb +11 -44
- data/lib/rails/all.rb +0 -1
- data/lib/rails/app_rails_loader.rb +37 -0
- data/lib/rails/application.rb +176 -124
- data/lib/rails/application/bootstrap.rb +29 -23
- data/lib/rails/application/configuration.rb +54 -48
- data/lib/rails/application/finisher.rb +8 -12
- data/lib/rails/application/routes_reloader.rb +2 -2
- data/lib/rails/backtrace_cleaner.rb +1 -16
- data/lib/rails/cli.rb +2 -2
- data/lib/rails/code_statistics.rb +30 -45
- data/lib/rails/code_statistics_calculator.rb +79 -0
- data/lib/rails/commands.rb +44 -37
- data/lib/rails/commands/application.rb +14 -9
- data/lib/rails/commands/console.rb +77 -33
- data/lib/rails/commands/dbconsole.rb +115 -64
- data/lib/rails/commands/destroy.rb +2 -3
- data/lib/rails/commands/generate.rb +2 -3
- data/lib/rails/commands/plugin_new.rb +0 -2
- data/lib/rails/commands/runner.rb +4 -5
- data/lib/rails/commands/server.rb +28 -9
- data/lib/rails/commands/update.rb +1 -1
- data/lib/rails/configuration.rb +35 -8
- data/lib/rails/console/app.rb +0 -4
- data/lib/rails/deprecation.rb +19 -0
- data/lib/rails/engine.rb +111 -92
- data/lib/rails/engine/commands.rb +1 -3
- data/lib/rails/engine/configuration.rb +26 -19
- data/lib/rails/engine/railties.rb +14 -18
- data/lib/rails/generators.rb +30 -50
- data/lib/rails/generators/actions.rb +38 -103
- data/lib/rails/generators/active_model.rb +14 -6
- data/lib/rails/generators/app_base.rb +70 -83
- data/lib/rails/generators/base.rb +23 -35
- data/lib/rails/generators/css/assets/assets_generator.rb +3 -3
- data/lib/rails/generators/css/scaffold/scaffold_generator.rb +3 -3
- data/lib/rails/generators/erb.rb +2 -2
- data/lib/rails/generators/erb/controller/controller_generator.rb +4 -4
- data/lib/rails/generators/erb/mailer/mailer_generator.rb +3 -3
- data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +4 -4
- data/lib/rails/generators/erb/scaffold/templates/index.html.erb +18 -14
- data/lib/rails/generators/erb/scaffold/templates/show.html.erb +1 -1
- data/lib/rails/generators/generated_attribute.rb +51 -16
- data/lib/rails/generators/js/assets/assets_generator.rb +3 -3
- data/lib/rails/generators/migration.rb +1 -5
- data/lib/rails/generators/named_base.rb +20 -25
- data/lib/rails/generators/rails/app/app_generator.rb +40 -48
- data/lib/rails/generators/rails/app/templates/Gemfile +8 -7
- data/lib/rails/generators/rails/app/templates/README.rdoc +28 -0
- data/lib/rails/generators/rails/app/templates/Rakefile +0 -1
- data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +2 -1
- data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +5 -0
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/bin/bundle +2 -0
- data/lib/rails/generators/rails/app/templates/bin/rails +3 -0
- data/lib/rails/generators/rails/app/templates/bin/rake +3 -0
- data/lib/rails/generators/rails/app/templates/config/application.rb +5 -43
- data/lib/rails/generators/rails/app/templates/config/boot.rb +0 -2
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml +2 -2
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml +1 -4
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml +8 -3
- data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml +57 -0
- data/lib/rails/generators/rails/app/templates/config/environment.rb +2 -2
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +9 -19
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +40 -29
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +12 -15
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb +6 -5
- data/lib/rails/generators/rails/app/templates/config/initializers/secret_token.rb.tt +6 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt +1 -6
- data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +6 -6
- data/lib/rails/generators/rails/app/templates/config/locales/en.yml +20 -2
- data/lib/rails/generators/rails/app/templates/config/routes.rb +15 -24
- data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/gitignore +3 -2
- data/lib/rails/generators/rails/app/templates/public/404.html +2 -1
- data/lib/rails/generators/rails/app/templates/public/422.html +1 -1
- data/lib/rails/generators/rails/app/templates/public/500.html +2 -1
- data/lib/rails/generators/rails/app/templates/public/robots.txt +1 -1
- data/lib/rails/generators/rails/app/templates/test/test_helper.rb +3 -1
- data/lib/rails/generators/rails/assets/assets_generator.rb +5 -5
- data/lib/rails/generators/rails/controller/USAGE +7 -7
- data/lib/rails/generators/rails/controller/controller_generator.rb +3 -3
- data/lib/rails/generators/rails/controller/templates/controller.rb +1 -1
- data/lib/rails/generators/rails/generator/generator_generator.rb +4 -4
- data/lib/rails/generators/rails/helper/USAGE +1 -1
- data/lib/rails/generators/rails/helper/helper_generator.rb +2 -2
- data/lib/rails/generators/rails/integration_test/integration_test_generator.rb +2 -2
- data/lib/rails/generators/rails/migration/USAGE +12 -6
- data/lib/rails/generators/rails/migration/migration_generator.rb +3 -3
- data/lib/rails/generators/rails/model/USAGE +53 -4
- data/lib/rails/generators/rails/model/model_generator.rb +3 -3
- data/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +81 -39
- data/lib/rails/generators/rails/plugin_new/templates/%name%.gemspec +2 -2
- data/lib/rails/generators/rails/plugin_new/templates/Gemfile +16 -1
- data/lib/rails/generators/rails/plugin_new/templates/Rakefile +3 -9
- data/lib/rails/generators/rails/plugin_new/templates/app/controllers/%name%/application_controller.rb.tt +0 -1
- data/lib/rails/generators/rails/plugin_new/templates/app/views/layouts/%name%/application.html.erb.tt +1 -1
- data/lib/rails/generators/rails/plugin_new/templates/{script → bin}/rails.tt +0 -0
- data/lib/rails/generators/rails/plugin_new/templates/gitignore +3 -0
- data/lib/rails/generators/rails/plugin_new/templates/lib/%name%.rb +1 -1
- data/lib/rails/generators/rails/plugin_new/templates/rails/application.rb +0 -1
- data/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb +0 -1
- data/lib/rails/generators/rails/resource/resource_generator.rb +5 -5
- data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +2 -2
- data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +11 -7
- data/lib/rails/generators/rails/scaffold_controller/USAGE +4 -4
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +9 -7
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +27 -48
- data/lib/rails/generators/rails/task/task_generator.rb +2 -2
- data/lib/rails/generators/rails/task/templates/task.rb +1 -1
- data/lib/rails/generators/resource_helpers.rb +3 -5
- data/lib/rails/generators/test_case.rb +22 -28
- data/lib/rails/generators/test_unit.rb +3 -3
- data/lib/rails/generators/test_unit/controller/controller_generator.rb +6 -6
- data/lib/rails/generators/test_unit/helper/helper_generator.rb +5 -5
- data/lib/rails/generators/test_unit/integration/integration_generator.rb +4 -4
- data/lib/rails/generators/test_unit/mailer/mailer_generator.rb +6 -6
- data/lib/rails/generators/test_unit/model/model_generator.rb +7 -7
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml +8 -2
- data/lib/rails/generators/test_unit/plugin/plugin_generator.rb +4 -4
- data/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +1 -2
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +10 -19
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +5 -5
- data/lib/rails/info.rb +3 -3
- data/lib/rails/info_controller.rb +26 -8
- data/lib/rails/initializable.rb +2 -2
- data/lib/rails/paths.rb +59 -54
- data/lib/rails/rack/debugger.rb +2 -2
- data/lib/rails/rack/logger.rb +33 -8
- data/lib/rails/railtie.rb +24 -24
- data/lib/rails/railtie/configurable.rb +1 -1
- data/lib/rails/railtie/configuration.rb +15 -5
- data/lib/rails/ruby_version_check.rb +3 -13
- data/lib/rails/rubyprof_ext.rb +1 -1
- data/lib/rails/source_annotation_extractor.rb +40 -17
- data/lib/rails/tasks/annotations.rake +1 -1
- data/lib/rails/tasks/documentation.rake +10 -57
- data/lib/rails/tasks/engine.rake +1 -1
- data/lib/rails/tasks/framework.rake +9 -9
- data/lib/rails/tasks/log.rake +18 -4
- data/lib/rails/tasks/middleware.rake +1 -1
- data/lib/rails/tasks/misc.rake +2 -9
- data/lib/rails/tasks/routes.rake +4 -6
- data/lib/rails/tasks/statistics.rake +8 -2
- data/lib/rails/tasks/tmp.rake +12 -4
- data/lib/rails/templates/layouts/application.html.erb +36 -0
- data/lib/rails/templates/rails/info/properties.html.erb +1 -0
- data/lib/rails/templates/rails/info/routes.html.erb +9 -0
- data/lib/rails/{generators/rails/app/templates/public/index.html → templates/rails/welcome/index.html.erb} +18 -14
- data/lib/rails/test_help.rb +6 -29
- data/lib/rails/test_unit/railtie.rb +2 -3
- data/lib/rails/test_unit/testing.rake +45 -33
- data/lib/rails/version.rb +4 -4
- data/lib/rails/welcome_controller.rb +7 -0
- metadata +86 -378
- data/guides/assets/images/belongs_to.png +0 -0
- data/guides/assets/images/book_icon.gif +0 -0
- data/guides/assets/images/bullet.gif +0 -0
- data/guides/assets/images/challenge.png +0 -0
- data/guides/assets/images/chapters_icon.gif +0 -0
- data/guides/assets/images/check_bullet.gif +0 -0
- data/guides/assets/images/credits_pic_blank.gif +0 -0
- data/guides/assets/images/csrf.png +0 -0
- data/guides/assets/images/customized_error_messages.png +0 -0
- data/guides/assets/images/edge_badge.png +0 -0
- data/guides/assets/images/error_messages.png +0 -0
- data/guides/assets/images/feature_tile.gif +0 -0
- data/guides/assets/images/footer_tile.gif +0 -0
- data/guides/assets/images/fxn.png +0 -0
- data/guides/assets/images/grey_bullet.gif +0 -0
- data/guides/assets/images/habtm.png +0 -0
- data/guides/assets/images/has_many.png +0 -0
- data/guides/assets/images/has_many_through.png +0 -0
- data/guides/assets/images/has_one.png +0 -0
- data/guides/assets/images/has_one_through.png +0 -0
- data/guides/assets/images/header_backdrop.png +0 -0
- data/guides/assets/images/header_tile.gif +0 -0
- data/guides/assets/images/i18n/demo_html_safe.png +0 -0
- data/guides/assets/images/i18n/demo_localized_pirate.png +0 -0
- data/guides/assets/images/i18n/demo_translated_en.png +0 -0
- data/guides/assets/images/i18n/demo_translated_pirate.png +0 -0
- data/guides/assets/images/i18n/demo_translation_missing.png +0 -0
- data/guides/assets/images/i18n/demo_untranslated.png +0 -0
- data/guides/assets/images/icons/README +0 -5
- data/guides/assets/images/icons/callouts/1.png +0 -0
- data/guides/assets/images/icons/callouts/10.png +0 -0
- data/guides/assets/images/icons/callouts/11.png +0 -0
- data/guides/assets/images/icons/callouts/12.png +0 -0
- data/guides/assets/images/icons/callouts/13.png +0 -0
- data/guides/assets/images/icons/callouts/14.png +0 -0
- data/guides/assets/images/icons/callouts/15.png +0 -0
- data/guides/assets/images/icons/callouts/2.png +0 -0
- data/guides/assets/images/icons/callouts/3.png +0 -0
- data/guides/assets/images/icons/callouts/4.png +0 -0
- data/guides/assets/images/icons/callouts/5.png +0 -0
- data/guides/assets/images/icons/callouts/6.png +0 -0
- data/guides/assets/images/icons/callouts/7.png +0 -0
- data/guides/assets/images/icons/callouts/8.png +0 -0
- data/guides/assets/images/icons/callouts/9.png +0 -0
- data/guides/assets/images/icons/caution.png +0 -0
- data/guides/assets/images/icons/example.png +0 -0
- data/guides/assets/images/icons/home.png +0 -0
- data/guides/assets/images/icons/important.png +0 -0
- data/guides/assets/images/icons/next.png +0 -0
- data/guides/assets/images/icons/note.png +0 -0
- data/guides/assets/images/icons/prev.png +0 -0
- data/guides/assets/images/icons/tip.png +0 -0
- data/guides/assets/images/icons/up.png +0 -0
- data/guides/assets/images/icons/warning.png +0 -0
- data/guides/assets/images/jaimeiniesta.jpg +0 -0
- data/guides/assets/images/nav_arrow.gif +0 -0
- data/guides/assets/images/polymorphic.png +0 -0
- data/guides/assets/images/posts_index.png +0 -0
- data/guides/assets/images/radar.png +0 -0
- data/guides/assets/images/rails_guides_kindle_cover.jpg +0 -0
- data/guides/assets/images/rails_guides_logo.gif +0 -0
- data/guides/assets/images/rails_logo_remix.gif +0 -0
- data/guides/assets/images/rails_welcome.png +0 -0
- data/guides/assets/images/session_fixation.png +0 -0
- data/guides/assets/images/tab_grey.gif +0 -0
- data/guides/assets/images/tab_info.gif +0 -0
- data/guides/assets/images/tab_note.gif +0 -0
- data/guides/assets/images/tab_red.gif +0 -0
- data/guides/assets/images/tab_yellow.gif +0 -0
- data/guides/assets/images/tab_yellow.png +0 -0
- data/guides/assets/images/validation_error_messages.png +0 -0
- data/guides/assets/images/vijaydev.jpg +0 -0
- data/guides/assets/javascripts/guides.js +0 -7
- data/guides/assets/javascripts/syntaxhighlighter/shBrushAS3.js +0 -59
- data/guides/assets/javascripts/syntaxhighlighter/shBrushAppleScript.js +0 -75
- data/guides/assets/javascripts/syntaxhighlighter/shBrushBash.js +0 -59
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCSharp.js +0 -65
- data/guides/assets/javascripts/syntaxhighlighter/shBrushColdFusion.js +0 -100
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCpp.js +0 -97
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCss.js +0 -91
- data/guides/assets/javascripts/syntaxhighlighter/shBrushDelphi.js +0 -55
- data/guides/assets/javascripts/syntaxhighlighter/shBrushDiff.js +0 -41
- data/guides/assets/javascripts/syntaxhighlighter/shBrushErlang.js +0 -52
- data/guides/assets/javascripts/syntaxhighlighter/shBrushGroovy.js +0 -67
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJScript.js +0 -52
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJava.js +0 -57
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJavaFX.js +0 -58
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPerl.js +0 -72
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPhp.js +0 -88
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPlain.js +0 -33
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPowerShell.js +0 -74
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPython.js +0 -64
- data/guides/assets/javascripts/syntaxhighlighter/shBrushRuby.js +0 -55
- data/guides/assets/javascripts/syntaxhighlighter/shBrushSass.js +0 -94
- data/guides/assets/javascripts/syntaxhighlighter/shBrushScala.js +0 -51
- data/guides/assets/javascripts/syntaxhighlighter/shBrushSql.js +0 -66
- data/guides/assets/javascripts/syntaxhighlighter/shBrushVb.js +0 -56
- data/guides/assets/javascripts/syntaxhighlighter/shBrushXml.js +0 -69
- data/guides/assets/javascripts/syntaxhighlighter/shCore.js +0 -17
- data/guides/assets/stylesheets/fixes.css +0 -16
- data/guides/assets/stylesheets/kindle.css +0 -11
- data/guides/assets/stylesheets/main.css +0 -453
- data/guides/assets/stylesheets/print.css +0 -52
- data/guides/assets/stylesheets/reset.css +0 -43
- data/guides/assets/stylesheets/style.css +0 -13
- data/guides/assets/stylesheets/syntaxhighlighter/shCore.css +0 -226
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreDefault.css +0 -328
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreDjango.css +0 -331
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreEclipse.css +0 -339
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreEmacs.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreMDUltra.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreMidnight.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreRDark.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeDefault.css +0 -117
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeDjango.css +0 -120
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeEclipse.css +0 -128
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeEmacs.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeMDUltra.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeMidnight.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeRDark.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeRailsGuides.css +0 -116
- data/guides/code/getting_started/Gemfile +0 -38
- data/guides/code/getting_started/README.rdoc +0 -261
- data/guides/code/getting_started/Rakefile +0 -7
- data/guides/code/getting_started/app/assets/images/rails.png +0 -0
- data/guides/code/getting_started/app/assets/javascripts/application.js +0 -15
- data/guides/code/getting_started/app/assets/javascripts/comments.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/javascripts/home.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/javascripts/posts.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/application.css +0 -13
- data/guides/code/getting_started/app/assets/stylesheets/comments.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/home.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/posts.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/scaffolds.css.scss +0 -56
- data/guides/code/getting_started/app/controllers/application_controller.rb +0 -3
- data/guides/code/getting_started/app/controllers/comments_controller.rb +0 -16
- data/guides/code/getting_started/app/controllers/home_controller.rb +0 -5
- data/guides/code/getting_started/app/controllers/posts_controller.rb +0 -84
- data/guides/code/getting_started/app/helpers/application_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/comments_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/home_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/posts_helper.rb +0 -5
- data/guides/code/getting_started/app/models/comment.rb +0 -3
- data/guides/code/getting_started/app/models/post.rb +0 -11
- data/guides/code/getting_started/app/models/tag.rb +0 -3
- data/guides/code/getting_started/app/views/comments/_comment.html.erb +0 -15
- data/guides/code/getting_started/app/views/comments/_form.html.erb +0 -13
- data/guides/code/getting_started/app/views/home/index.html.erb +0 -2
- data/guides/code/getting_started/app/views/layouts/application.html.erb +0 -14
- data/guides/code/getting_started/app/views/posts/_form.html.erb +0 -32
- data/guides/code/getting_started/app/views/posts/edit.html.erb +0 -6
- data/guides/code/getting_started/app/views/posts/index.html.erb +0 -27
- data/guides/code/getting_started/app/views/posts/new.html.erb +0 -5
- data/guides/code/getting_started/app/views/posts/show.html.erb +0 -31
- data/guides/code/getting_started/app/views/tags/_form.html.erb +0 -12
- data/guides/code/getting_started/config.ru +0 -4
- data/guides/code/getting_started/config/application.rb +0 -59
- data/guides/code/getting_started/config/boot.rb +0 -6
- data/guides/code/getting_started/config/database.yml +0 -25
- data/guides/code/getting_started/config/environment.rb +0 -5
- data/guides/code/getting_started/config/environments/development.rb +0 -37
- data/guides/code/getting_started/config/environments/production.rb +0 -67
- data/guides/code/getting_started/config/environments/test.rb +0 -37
- data/guides/code/getting_started/config/initializers/backtrace_silencers.rb +0 -7
- data/guides/code/getting_started/config/initializers/inflections.rb +0 -15
- data/guides/code/getting_started/config/initializers/mime_types.rb +0 -5
- data/guides/code/getting_started/config/initializers/secret_token.rb +0 -7
- data/guides/code/getting_started/config/initializers/session_store.rb +0 -8
- data/guides/code/getting_started/config/initializers/wrap_parameters.rb +0 -14
- data/guides/code/getting_started/config/locales/en.yml +0 -5
- data/guides/code/getting_started/config/routes.rb +0 -64
- data/guides/code/getting_started/db/migrate/20110901012504_create_posts.rb +0 -11
- data/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb +0 -12
- data/guides/code/getting_started/db/migrate/20110901013701_create_tags.rb +0 -11
- data/guides/code/getting_started/db/schema.rb +0 -43
- data/guides/code/getting_started/db/seeds.rb +0 -7
- data/guides/code/getting_started/doc/README_FOR_APP +0 -2
- data/guides/code/getting_started/public/404.html +0 -26
- data/guides/code/getting_started/public/422.html +0 -26
- data/guides/code/getting_started/public/500.html +0 -25
- data/guides/code/getting_started/public/favicon.ico +0 -0
- data/guides/code/getting_started/public/robots.txt +0 -5
- data/guides/code/getting_started/script/rails +0 -6
- data/guides/code/getting_started/test/fixtures/comments.yml +0 -11
- data/guides/code/getting_started/test/fixtures/posts.yml +0 -11
- data/guides/code/getting_started/test/fixtures/tags.yml +0 -9
- data/guides/code/getting_started/test/functional/comments_controller_test.rb +0 -7
- data/guides/code/getting_started/test/functional/home_controller_test.rb +0 -9
- data/guides/code/getting_started/test/functional/posts_controller_test.rb +0 -49
- data/guides/code/getting_started/test/performance/browsing_test.rb +0 -12
- data/guides/code/getting_started/test/test_helper.rb +0 -13
- data/guides/code/getting_started/test/unit/comment_test.rb +0 -7
- data/guides/code/getting_started/test/unit/helpers/comments_helper_test.rb +0 -4
- data/guides/code/getting_started/test/unit/helpers/home_helper_test.rb +0 -4
- data/guides/code/getting_started/test/unit/helpers/posts_helper_test.rb +0 -4
- data/guides/code/getting_started/test/unit/post_test.rb +0 -7
- data/guides/code/getting_started/test/unit/tag_test.rb +0 -7
- data/guides/rails_guides.rb +0 -50
- data/guides/rails_guides/generator.rb +0 -310
- data/guides/rails_guides/helpers.rb +0 -45
- data/guides/rails_guides/indexer.rb +0 -69
- data/guides/rails_guides/levenshtein.rb +0 -31
- data/guides/rails_guides/textile_extensions.rb +0 -63
- data/guides/source/2_2_release_notes.textile +0 -422
- data/guides/source/2_3_release_notes.textile +0 -610
- data/guides/source/3_0_release_notes.textile +0 -595
- data/guides/source/3_1_release_notes.textile +0 -553
- data/guides/source/3_2_release_notes.textile +0 -540
- data/guides/source/_license.html.erb +0 -2
- data/guides/source/_welcome.html.erb +0 -19
- data/guides/source/action_controller_overview.textile +0 -820
- data/guides/source/action_mailer_basics.textile +0 -516
- data/guides/source/action_view_overview.textile +0 -1497
- data/guides/source/active_model_basics.textile +0 -205
- data/guides/source/active_record_basics.textile +0 -218
- data/guides/source/active_record_querying.textile +0 -1433
- data/guides/source/active_record_validations_callbacks.textile +0 -1287
- data/guides/source/active_resource_basics.textile +0 -120
- data/guides/source/active_support_core_extensions.textile +0 -3715
- data/guides/source/api_documentation_guidelines.textile +0 -185
- data/guides/source/asset_pipeline.textile +0 -707
- data/guides/source/association_basics.textile +0 -1959
- data/guides/source/caching_with_rails.textile +0 -437
- data/guides/source/command_line.textile +0 -574
- data/guides/source/configuring.textile +0 -643
- data/guides/source/contributing_to_ruby_on_rails.textile +0 -448
- data/guides/source/credits.html.erb +0 -72
- data/guides/source/debugging_rails_applications.textile +0 -714
- data/guides/source/documents.yaml +0 -157
- data/guides/source/engines.textile +0 -618
- data/guides/source/form_helpers.textile +0 -798
- data/guides/source/generators.textile +0 -621
- data/guides/source/getting_started.textile +0 -1931
- data/guides/source/i18n.textile +0 -931
- data/guides/source/index.html.erb +0 -30
- data/guides/source/initialization.textile +0 -1116
- data/guides/source/kindle/KINDLE.md +0 -26
- data/guides/source/kindle/copyright.html.erb +0 -1
- data/guides/source/kindle/layout.html.erb +0 -27
- data/guides/source/kindle/rails_guides.opf.erb +0 -52
- data/guides/source/kindle/toc.html.erb +0 -24
- data/guides/source/kindle/toc.ncx.erb +0 -64
- data/guides/source/kindle/welcome.html.erb +0 -5
- data/guides/source/layout.html.erb +0 -124
- data/guides/source/layouts_and_rendering.textile +0 -1237
- data/guides/source/migrations.textile +0 -900
- data/guides/source/nested_model_forms.textile +0 -222
- data/guides/source/performance_testing.textile +0 -597
- data/guides/source/plugins.textile +0 -464
- data/guides/source/rails_application_templates.textile +0 -240
- data/guides/source/rails_on_rack.textile +0 -236
- data/guides/source/routing.textile +0 -885
- data/guides/source/ruby_on_rails_guides_guidelines.textile +0 -79
- data/guides/source/security.textile +0 -1004
- data/guides/source/testing.textile +0 -947
- data/guides/w3c_validator.rb +0 -91
- data/lib/rails/application/railties.rb +0 -13
- data/lib/rails/application/route_inspector.rb +0 -84
- data/lib/rails/commands/benchmarker.rb +0 -34
- data/lib/rails/commands/plugin.rb +0 -544
- data/lib/rails/commands/profiler.rb +0 -33
- data/lib/rails/generators/rails/app/templates/README +0 -261
- data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb +0 -3
- data/lib/rails/generators/rails/app/templates/app/mailers/.empty_directory +0 -0
- data/lib/rails/generators/rails/app/templates/app/models/.empty_directory +0 -0
- data/lib/rails/generators/rails/app/templates/doc/README_FOR_APP +0 -2
- data/lib/rails/generators/rails/app/templates/public/stylesheets/.empty_directory +0 -0
- data/lib/rails/generators/rails/app/templates/script/rails +0 -5
- data/lib/rails/generators/rails/app/templates/test/fixtures/.empty_directory +0 -0
- data/lib/rails/generators/rails/app/templates/test/functional/.empty_directory +0 -0
- data/lib/rails/generators/rails/app/templates/test/integration/.empty_directory +0 -0
- data/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb +0 -12
- data/lib/rails/generators/rails/app/templates/test/unit/.empty_directory +0 -0
- data/lib/rails/generators/rails/generator/templates/templates/.empty_directory +0 -0
- data/lib/rails/generators/rails/observer/USAGE +0 -12
- data/lib/rails/generators/rails/observer/observer_generator.rb +0 -7
- data/lib/rails/generators/rails/performance_test/USAGE +0 -10
- data/lib/rails/generators/rails/performance_test/performance_test_generator.rb +0 -7
- data/lib/rails/generators/rails/plugin_new/templates/app/mailers/.empty_directory +0 -0
- data/lib/rails/generators/rails/plugin_new/templates/app/models/.empty_directory +0 -0
- data/lib/rails/generators/rails/session_migration/USAGE +0 -8
- data/lib/rails/generators/rails/session_migration/session_migration_generator.rb +0 -8
- data/lib/rails/generators/test_unit/observer/observer_generator.rb +0 -13
- data/lib/rails/generators/test_unit/observer/templates/unit_test.rb +0 -9
- data/lib/rails/generators/test_unit/performance/performance_generator.rb +0 -13
- data/lib/rails/generators/test_unit/performance/templates/performance_test.rb +0 -12
- data/lib/rails/performance_test_help.rb +0 -3
- data/lib/rails/plugin.rb +0 -92
- data/lib/rails/script_rails_loader.rb +0 -29
@@ -5,22 +5,23 @@ source 'https://rubygems.org'
|
|
5
5
|
<%= database_gemfile_entry -%>
|
6
6
|
|
7
7
|
<%= "gem 'jruby-openssl'\n" if defined?(JRUBY_VERSION) -%>
|
8
|
-
<%= "gem 'json'\n" if RUBY_VERSION < "1.9.2" -%>
|
9
8
|
|
10
9
|
<%= assets_gemfile_entry %>
|
11
|
-
<%= javascript_gemfile_entry
|
10
|
+
<%= javascript_gemfile_entry -%>
|
11
|
+
|
12
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
13
|
+
gem 'jbuilder', '~> 1.0.1'
|
12
14
|
|
13
15
|
# To use ActiveModel has_secure_password
|
14
16
|
# gem 'bcrypt-ruby', '~> 3.0.0'
|
15
17
|
|
16
|
-
# To use Jbuilder templates for JSON
|
17
|
-
# gem 'jbuilder'
|
18
|
-
|
19
18
|
# Use unicorn as the app server
|
20
19
|
# gem 'unicorn'
|
21
20
|
|
22
21
|
# Deploy with Capistrano
|
23
|
-
# gem 'capistrano'
|
22
|
+
# gem 'capistrano', group: :development
|
24
23
|
|
24
|
+
<% unless defined?(JRUBY_VERSION) -%>
|
25
25
|
# To use debugger
|
26
|
-
#
|
26
|
+
# gem 'debugger'
|
27
|
+
<% end -%>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
6
|
//
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
//
|
8
|
+
// compiled file.
|
9
9
|
//
|
10
10
|
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
11
|
// GO AFTER THE REQUIRES BELOW.
|
@@ -13,5 +13,6 @@
|
|
13
13
|
<% unless options[:skip_javascript] -%>
|
14
14
|
//= require <%= options[:javascript] %>
|
15
15
|
//= require <%= options[:javascript] %>_ujs
|
16
|
+
//= require turbolinks
|
16
17
|
<% end -%>
|
17
18
|
//= require_tree .
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title><%= camelized %></title>
|
5
|
-
<%%= stylesheet_link_tag "application", :
|
6
|
-
<%%= javascript_include_tag "application" %>
|
5
|
+
<%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
7
|
<%%= csrf_meta_tags %>
|
8
8
|
</head>
|
9
9
|
<body>
|
@@ -7,17 +7,12 @@ require 'rails/all'
|
|
7
7
|
<%= comment_if :skip_active_record %>require "active_record/railtie"
|
8
8
|
require "action_controller/railtie"
|
9
9
|
require "action_mailer/railtie"
|
10
|
-
require "active_resource/railtie"
|
11
10
|
<%= comment_if :skip_sprockets %>require "sprockets/railtie"
|
12
11
|
<%= comment_if :skip_test_unit %>require "rails/test_unit/railtie"
|
13
12
|
<% end -%>
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
18
|
-
# If you want your assets lazily compiled in production, use this line
|
19
|
-
# Bundler.require(:default, :assets, Rails.env)
|
20
|
-
end
|
14
|
+
# Assets should be precompiled for production (so we don't need the gems loaded then)
|
15
|
+
Bundler.require(*Rails.groups(assets: %w(development test)))
|
21
16
|
|
22
17
|
module <%= app_const_base %>
|
23
18
|
class Application < Rails::Application
|
@@ -25,16 +20,6 @@ module <%= app_const_base %>
|
|
25
20
|
# Application configuration should go into files in config/initializers
|
26
21
|
# -- all .rb files in that directory are automatically loaded.
|
27
22
|
|
28
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
29
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
30
|
-
|
31
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
32
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
33
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
34
|
-
|
35
|
-
# Activate observers that should always be running.
|
36
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
37
|
-
|
38
23
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
39
24
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
40
25
|
# config.time_zone = 'Central Time (US & Canada)'
|
@@ -42,33 +27,10 @@ module <%= app_const_base %>
|
|
42
27
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
43
28
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
44
29
|
# config.i18n.default_locale = :de
|
30
|
+
<% if options.skip_sprockets? -%>
|
45
31
|
|
46
|
-
#
|
47
|
-
config.
|
48
|
-
|
49
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
50
|
-
config.filter_parameters += [:password]
|
51
|
-
|
52
|
-
# Enable escaping HTML in JSON.
|
53
|
-
config.active_support.escape_html_entities_in_json = true
|
54
|
-
|
55
|
-
# Use SQL instead of Active Record's schema dumper when creating the database.
|
56
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
57
|
-
# like if you have constraints or database-specific column types
|
58
|
-
# config.active_record.schema_format = :sql
|
59
|
-
|
60
|
-
# Enforce whitelist mode for mass assignment.
|
61
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
62
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
63
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
64
|
-
<%= comment_if :skip_active_record %>config.active_record.whitelist_attributes = true
|
65
|
-
|
66
|
-
<% unless options.skip_sprockets? -%>
|
67
|
-
# Enable the asset pipeline
|
68
|
-
config.assets.enabled = true
|
69
|
-
|
70
|
-
# Version of your assets, change this if you want to expire all your assets
|
71
|
-
config.assets.version = '1.0'
|
32
|
+
# Disable the asset pipeline.
|
33
|
+
config.assets.enabled = false
|
72
34
|
<% end -%>
|
73
35
|
end
|
74
36
|
end
|
@@ -22,8 +22,8 @@ development:
|
|
22
22
|
# Minimum log levels, in increasing order:
|
23
23
|
# debug5, debug4, debug3, debug2, debug1,
|
24
24
|
# log, notice, warning, error, fatal, and panic
|
25
|
-
#
|
26
|
-
#min_messages:
|
25
|
+
# Defaults to warning.
|
26
|
+
#min_messages: notice
|
27
27
|
|
28
28
|
# Warning: The database defined as "test" will be erased and
|
29
29
|
# re-generated from your development database when you run "rake".
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# MySQL. Versions 4.1 and 5.0 are recommended.
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Install the MYSQL driver
|
4
4
|
# gem install mysql2
|
5
5
|
#
|
@@ -11,7 +11,6 @@
|
|
11
11
|
development:
|
12
12
|
adapter: mysql2
|
13
13
|
encoding: utf8
|
14
|
-
reconnect: false
|
15
14
|
database: <%= app_name %>_development
|
16
15
|
pool: 5
|
17
16
|
username: root
|
@@ -28,7 +27,6 @@ development:
|
|
28
27
|
test:
|
29
28
|
adapter: mysql2
|
30
29
|
encoding: utf8
|
31
|
-
reconnect: false
|
32
30
|
database: <%= app_name %>_test
|
33
31
|
pool: 5
|
34
32
|
username: root
|
@@ -42,7 +40,6 @@ test:
|
|
42
40
|
production:
|
43
41
|
adapter: mysql2
|
44
42
|
encoding: utf8
|
45
|
-
reconnect: false
|
46
43
|
database: <%= app_name %>_production
|
47
44
|
pool: 5
|
48
45
|
username: root
|
@@ -2,7 +2,9 @@
|
|
2
2
|
#
|
3
3
|
# Install the pg driver:
|
4
4
|
# gem install pg
|
5
|
-
# On
|
5
|
+
# On OS X with Homebrew:
|
6
|
+
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
|
7
|
+
# On OS X with MacPorts:
|
6
8
|
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
|
7
9
|
# On Windows:
|
8
10
|
# gem install pg
|
@@ -24,6 +26,9 @@ development:
|
|
24
26
|
# domain socket that doesn't need configuration. Windows does not have
|
25
27
|
# domain sockets, so uncomment these lines.
|
26
28
|
#host: localhost
|
29
|
+
|
30
|
+
# The TCP port the server listens on. Defaults to 5432.
|
31
|
+
# If your server runs on a different port number, change accordingly.
|
27
32
|
#port: 5432
|
28
33
|
|
29
34
|
# Schema search path. The server defaults to $user,public
|
@@ -32,8 +37,8 @@ development:
|
|
32
37
|
# Minimum log levels, in increasing order:
|
33
38
|
# debug5, debug4, debug3, debug2, debug1,
|
34
39
|
# log, notice, warning, error, fatal, and panic
|
35
|
-
#
|
36
|
-
#min_messages:
|
40
|
+
# Defaults to warning.
|
41
|
+
#min_messages: notice
|
37
42
|
|
38
43
|
# Warning: The database defined as "test" will be erased and
|
39
44
|
# re-generated from your development database when you run "rake".
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# SQL Server (2005 or higher recommended)
|
2
|
+
#
|
3
|
+
# Install the adapters and driver
|
4
|
+
# gem install tiny_tds
|
5
|
+
# gem install activerecord-sqlserver-adapter
|
6
|
+
#
|
7
|
+
# Ensure the activerecord adapter and db driver gems are defined in your Gemfile
|
8
|
+
# gem 'tiny_tds'
|
9
|
+
# gem 'activerecord-sqlserver-adapter'
|
10
|
+
#
|
11
|
+
# You should make sure freetds is configured correctly first.
|
12
|
+
# freetds.conf contains host/port/protocol_versions settings.
|
13
|
+
# http://freetds.schemamania.org/userguide/freetdsconf.htm
|
14
|
+
#
|
15
|
+
# A typical Microsoft server
|
16
|
+
# [mssql]
|
17
|
+
# host = mssqlserver.yourdomain.com
|
18
|
+
# port = 1433
|
19
|
+
# tds version = 7.1
|
20
|
+
|
21
|
+
# If you can connect with "tsql -S servername", your basic FreeTDS installation is working.
|
22
|
+
# 'man tsql' for more info
|
23
|
+
# Set timeout to a larger number if valid queries against a live db fail
|
24
|
+
|
25
|
+
development:
|
26
|
+
adapter: sqlserver
|
27
|
+
encoding: utf8
|
28
|
+
reconnect: false
|
29
|
+
database: <%= app_name %>_development
|
30
|
+
username: <%= app_name %>
|
31
|
+
password:
|
32
|
+
timeout: 25
|
33
|
+
dataserver: from_freetds.conf
|
34
|
+
|
35
|
+
|
36
|
+
# Warning: The database defined as "test" will be erased and
|
37
|
+
# re-generated from your development database when you run "rake".
|
38
|
+
# Do not set this db to the same as development or production.
|
39
|
+
test:
|
40
|
+
adapter: sqlserver
|
41
|
+
encoding: utf8
|
42
|
+
reconnect: false
|
43
|
+
database: <%= app_name %>_test
|
44
|
+
username: <%= app_name %>
|
45
|
+
password:
|
46
|
+
timeout: 25
|
47
|
+
dataserver: from_freetds.conf
|
48
|
+
|
49
|
+
production:
|
50
|
+
adapter: sqlserver
|
51
|
+
encoding: utf8
|
52
|
+
reconnect: false
|
53
|
+
database: <%= app_name %>_production
|
54
|
+
username: <%= app_name %>
|
55
|
+
password:
|
56
|
+
timeout: 25
|
57
|
+
dataserver: from_freetds.conf
|
@@ -1,41 +1,31 @@
|
|
1
1
|
<%= app_const %>.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
5
|
# every request. This slows down response time but is perfect for development
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
#
|
10
|
-
config.
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
11
|
|
12
|
-
# Show full error reports and disable caching
|
12
|
+
# Show full error reports and disable caching.
|
13
13
|
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
-
# Don't care if the mailer can't send
|
16
|
+
# Don't care if the mailer can't send.
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
18
18
|
|
19
|
-
# Print deprecation notices to the Rails logger
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
20
|
config.active_support.deprecation = :log
|
21
21
|
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
|
25
22
|
<%- unless options.skip_active_record? -%>
|
26
|
-
# Raise
|
27
|
-
config.active_record.
|
28
|
-
|
29
|
-
# Log the query plan for queries taking more than this (works
|
30
|
-
# with SQLite, MySQL, and PostgreSQL)
|
31
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
23
|
+
# Raise an error on page load if there are pending migrations
|
24
|
+
config.active_record.migration_error = :page_load
|
32
25
|
<%- end -%>
|
33
26
|
|
34
27
|
<%- unless options.skip_sprockets? -%>
|
35
|
-
#
|
36
|
-
config.assets.compress = false
|
37
|
-
|
38
|
-
# Expands the lines which load the assets
|
28
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
39
29
|
config.assets.debug = true
|
40
30
|
<%- end -%>
|
41
31
|
end
|
@@ -1,73 +1,84 @@
|
|
1
1
|
<%= app_const %>.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
|
-
# Code is not reloaded between requests
|
4
|
+
# Code is not reloaded between requests.
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
|
-
#
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both thread web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
8
14
|
config.consider_all_requests_local = false
|
9
15
|
config.action_controller.perform_caching = true
|
10
16
|
|
11
|
-
#
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
12
23
|
config.serve_static_assets = false
|
13
24
|
|
14
25
|
<%- unless options.skip_sprockets? -%>
|
15
|
-
# Compress JavaScripts and CSS
|
16
|
-
config.assets.
|
26
|
+
# Compress JavaScripts and CSS.
|
27
|
+
config.assets.js_compressor = :uglifier
|
28
|
+
# config.assets.css_compressor = :sass
|
17
29
|
|
18
|
-
#
|
30
|
+
# Whether to fallback to assets pipeline if a precompiled asset is missed.
|
19
31
|
config.assets.compile = false
|
20
32
|
|
21
|
-
# Generate digests for assets URLs
|
33
|
+
# Generate digests for assets URLs.
|
22
34
|
config.assets.digest = true
|
23
35
|
|
24
|
-
#
|
25
|
-
|
36
|
+
# Version of your assets, change this if you want to expire all your assets.
|
37
|
+
config.assets.version = '1.0'
|
26
38
|
<%- end -%>
|
27
39
|
|
28
|
-
# Specifies the header that your server uses for sending files
|
40
|
+
# Specifies the header that your server uses for sending files.
|
29
41
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
30
42
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
31
43
|
|
32
44
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
33
45
|
# config.force_ssl = true
|
34
46
|
|
35
|
-
#
|
36
|
-
|
47
|
+
# Set to :debug to see everything in the log.
|
48
|
+
config.log_level = :info
|
37
49
|
|
38
|
-
# Prepend all log lines with the following tags
|
50
|
+
# Prepend all log lines with the following tags.
|
39
51
|
# config.log_tags = [ :subdomain, :uuid ]
|
40
52
|
|
41
|
-
# Use a different logger for distributed setups
|
53
|
+
# Use a different logger for distributed setups.
|
42
54
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
43
55
|
|
44
|
-
# Use a different cache store in production
|
56
|
+
# Use a different cache store in production.
|
45
57
|
# config.cache_store = :mem_cache_store
|
46
58
|
|
47
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
59
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
48
60
|
# config.action_controller.asset_host = "http://assets.example.com"
|
49
61
|
|
50
62
|
<%- unless options.skip_sprockets? -%>
|
51
|
-
# Precompile additional assets
|
63
|
+
# Precompile additional assets.
|
64
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
52
65
|
# config.assets.precompile += %w( search.js )
|
53
66
|
<%- end -%>
|
54
67
|
|
55
|
-
#
|
68
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
69
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
56
70
|
# config.action_mailer.raise_delivery_errors = false
|
57
71
|
|
58
|
-
# Enable threaded mode
|
59
|
-
# config.threadsafe!
|
60
|
-
|
61
72
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
62
|
-
# the I18n.default_locale when a translation can not be found)
|
73
|
+
# the I18n.default_locale when a translation can not be found).
|
63
74
|
config.i18n.fallbacks = true
|
64
75
|
|
65
|
-
# Send deprecation notices to registered listeners
|
76
|
+
# Send deprecation notices to registered listeners.
|
66
77
|
config.active_support.deprecation = :notify
|
67
78
|
|
68
|
-
|
69
|
-
#
|
70
|
-
|
71
|
-
#
|
72
|
-
|
79
|
+
# Disable automatic flushing of the log to improve performance.
|
80
|
+
# config.autoflush_log = false
|
81
|
+
|
82
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
83
|
+
config.log_formatter = ::Logger::Formatter.new
|
73
84
|
end
|