From 14067b016435456e605e656a12c1b348c35b6cc6 Mon Sep 17 00:00:00 2001 From: Tute Costa Date: Thu, 15 Mar 2012 09:42:32 -0300 Subject: [PATCH] Requiring generic model code. --- lib/impressionist/engine.rb | 1 + lib/impressionist/models/mongo_mapper/impression.rb | 1 - test_app/Gemfile | 1 + test_app/app/controllers/widgets_controller.rb | 1 - 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/impressionist/engine.rb b/lib/impressionist/engine.rb index 197a16c..0764e2b 100644 --- a/lib/impressionist/engine.rb +++ b/lib/impressionist/engine.rb @@ -4,6 +4,7 @@ require "rails" module Impressionist class Engine < Rails::Engine initializer 'impressionist.model' do |app| + require "../app/models/impressionist/impressionable.rb" if Impressionist.orm == :active_record require "impressionist/models/active_record/impression.rb" require "impressionist/models/active_record/impressionist/impressionable.rb" diff --git a/lib/impressionist/models/mongo_mapper/impression.rb b/lib/impressionist/models/mongo_mapper/impression.rb index ce1ec0f..a7d5f64 100644 --- a/lib/impressionist/models/mongo_mapper/impression.rb +++ b/lib/impressionist/models/mongo_mapper/impression.rb @@ -12,6 +12,5 @@ class Impression key :session_hash, String key :message, String key :referrer, String - timestamps! end diff --git a/test_app/Gemfile b/test_app/Gemfile index 4ac1533..67f8bb2 100644 --- a/test_app/Gemfile +++ b/test_app/Gemfile @@ -11,6 +11,7 @@ platforms :jruby do end platforms :ruby, :mswin, :mingw do + gem 'pg' gem 'sqlite3' end diff --git a/test_app/app/controllers/widgets_controller.rb b/test_app/app/controllers/widgets_controller.rb index 433153c..b6b99a7 100644 --- a/test_app/app/controllers/widgets_controller.rb +++ b/test_app/app/controllers/widgets_controller.rb @@ -9,5 +9,4 @@ class WidgetsController < ApplicationController def new end - end