Skip to content

Commit

Permalink
remove ActiveRecord from app
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Jun 24, 2013
1 parent 4855ecf commit d2f5184
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 32 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
# No db at all!
#gem 'sqlite3'


# Gems used only for assets and not required
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.14)
Expand All @@ -107,5 +106,4 @@ DEPENDENCIES
jquery-rails
rails (= 3.2.13)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)
10 changes: 8 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
require File.expand_path('../boot', __FILE__)

require 'rails/all'
# No ActiveRecord please
#require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"
require "sprockets/railtie"

if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Expand Down Expand Up @@ -51,7 +57,7 @@ class Application < Rails::Application
# 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
Expand Down
25 changes: 0 additions & 25 deletions config/database.yml

This file was deleted.

4 changes: 2 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
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
Expand Down

0 comments on commit d2f5184

Please sign in to comment.