Created
June 28, 2014 14:29
-
-
Save xionon/f946b27f27c1fbb6eaba to your computer and use it in GitHub Desktop.
Difference between an app generated with active record and an app without active record
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r app-with-ar/Gemfile app-without-ar/Gemfile | |
6,7d5 | |
< # Use sqlite3 as the database for Active Record | |
< gem 'sqlite3' | |
diff -r app-with-ar/Gemfile.lock app-without-ar/Gemfile.lock | |
97d96 | |
< sqlite3 (1.3.9) | |
123d121 | |
< sqlite3 | |
diff -r app-with-ar/config/application.rb app-without-ar/config/application.rb | |
3c3,10 | |
< require 'rails/all' | |
--- | |
> # Pick the frameworks you want: | |
> require "active_model/railtie" | |
> # require "active_record/railtie" | |
> require "action_controller/railtie" | |
> require "action_mailer/railtie" | |
> require "action_view/railtie" | |
> require "sprockets/railtie" | |
> require "rails/test_unit/railtie" | |
9c16 | |
< module AppWithAr | |
--- | |
> module AppWithoutAr | |
Only in app-with-ar/config: database.yml | |
diff -r app-with-ar/config/environments/development.rb app-without-ar/config/environments/development.rb | |
22,24d21 | |
< # Raise an error on page load if there are pending migrations. | |
< config.active_record.migration_error = :page_load | |
< | |
diff -r app-with-ar/config/environments/production.rb app-without-ar/config/environments/production.rb | |
80,82d79 | |
< | |
< # Do not dump schema after migrations. | |
< config.active_record.dump_schema_after_migration = false | |
diff -r app-with-ar/config/initializers/wrap_parameters.rb app-without-ar/config/initializers/wrap_parameters.rb | |
10,14d9 | |
< | |
< # To enable root element in JSON for ActiveRecord objects. | |
< # ActiveSupport.on_load(:active_record) do | |
< # self.include_root_in_json = true | |
< # end | |
diff -r app-with-ar/test/test_helper.rb app-without-ar/test/test_helper.rb | |
6,11d5 | |
< # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. | |
< # | |
< # Note: You'll currently still have to declare fixtures explicitly in integration tests | |
< # -- they do not yet inherit this setting | |
< fixtures :all | |
< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The differences are relatively minor. The important ones are in config/application.rb and config/environments/*.rb.
Note: I snipped out some absolutely irrelevant diffs - app/views/layouts/application.html.erb, etc.