Permalink
Browse files

Fix initialization

  • Loading branch information...
1 parent 744ec96 commit d3e031a1a8f66991d8d9f6d0825383876dad5aad @brutuscat committed Apr 9, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/green_monkey/railtie.rb
@@ -2,14 +2,16 @@
module GreenMonkey
class Railtie < Rails::Railtie
- initializer "load extentions and patches" do
+ initializer 'green_monkey.init', :before=> :load_config_initializers do
require "green_monkey/ext/active_model"
- ActiveModel::Dirty.send :include, GreenMonkey::ModelHelpers
+ ActiveSupport.on_load(:active_record) do
+ include(GreenMonkey::ModelHelpers)
+ end
require 'green_monkey/ext/view_helper'
ActionView::Base.send :include, GreenMonkey::ViewHelper
- require "green_monkey/ext/action_view"
+ # require "green_monkey/ext/action_view"
@brutuscat

brutuscat Apr 9, 2012

Owner

This should manually be required in an initializer only if your not using html5, so the haml format mode be consistent.

require "green_monkey/ext/haml"
require "green_monkey/ext/mida"
end

0 comments on commit d3e031a

Please sign in to comment.