lib/lalala/engine.rb in lalala-4.0.0.dev.165 vs lib/lalala/engine.rb in lalala-4.0.0.dev.168

- old
+ new

@@ -1,6 +1,8 @@ module Lalala + require 'lalala' + class Engine < Rails::Engine config.i18n.fallbacks = true config.i18n.default_locale = :en config.i18n.available_locales = [:en] @@ -84,14 +86,16 @@ ActiveSupport.on_load :active_record do Lalala::ExtWithAdvisoryLock.patch! end - Formtastic::FormBuilder.send( - :include, Lalala::Markdown::InputHelper) + if defined?(Formtastic) + Formtastic::FormBuilder.send( + :include, Lalala::Markdown::InputHelper) - Formtastic::FormBuilder.send( - :include, Lalala::ExtI18n::InputHelper) + Formtastic::FormBuilder.send( + :include, Lalala::ExtI18n::InputHelper) + end ActiveSupport.on_load :active_record do ActiveRecord::ConnectionAdapters::AbstractAdapter.send( :include, Lalala::ExtActiveRecord::Schema::JoinTable)