Removes active record from a Rails app
diff --git a/Gemfile b/Gemfile | |
index fd83475..a4c0255 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -5,7 +5,7 @@ gem 'rails', '3.2.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
-gem 'sqlite3' | |
+# gem 'sqlite3' | |
gem 'json' | |
diff --git a/config/application.rb b/config/application.rb | |
index bd6ecc6..cf4d1e2 100644 | |
--- a/config/application.rb | |
+++ b/config/application.rb | |
@@ -1,6 +1,17 @@ | |
require File.expand_path('../boot', __FILE__) | |
-require 'rails/all' | |
+%w( | |
+ action_controller | |
+ action_mailer | |
+ active_resource | |
+ rails/test_unit | |
+ sprockets | |
+).each do |framework| | |
+ begin | |
+ require "#{framework}/railtie" | |
+ rescue LoadError | |
+ end | |
+end | |
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
@@ -48,7 +59,7 @@ module StorePublisher | |
# This will create an empty whitelist of attributes available for mass-assignment for all models | |
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible | |
# parameters by using an attr_accessible or attr_protected declaration. | |
- config.active_record.whitelist_attributes = true | |
+ # config.active_record.whitelist_attributes = true | |
# Enable the asset pipeline | |
config.assets.enabled = true | |
diff --git a/config/environments/development.rb b/config/environments/development.rb | |
index 769c2a9..5a12b26 100644 | |
--- a/config/environments/development.rb | |
+++ b/config/environments/development.rb | |
@@ -23,11 +23,11 @@ StorePublisher::Application.configure do | |
config.action_dispatch.best_standards_support = :builtin | |
# Raise exception on mass assignment protection for Active Record models | |
- config.active_record.mass_assignment_sanitizer = :strict | |
+ # config.active_record.mass_assignment_sanitizer = :strict | |
# Log the query plan for queries taking more than this (works | |
# with SQLite, MySQL, and PostgreSQL) | |
- config.active_record.auto_explain_threshold_in_seconds = 0.5 | |
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5 | |
# Do not compress assets | |
config.assets.compress = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment