Sha256: 473f7703c50f57d96c53671952157d6c9d3e47088a5be3d8da2138c0e098b2b0
Contents?: true
Size: 1005 Bytes
Versions: 1
Compression:
Stored size: 1005 Bytes
Contents
module ActsAsMarkup class Railtie < Rails::Railtie config.acts_as_markup = ActiveSupport::OrderedOptions.new initializer 'acts_as_markup.set_config', :after => 'active_record.initialize_database' do |app| ActiveSupport.on_load(:acts_as_markup) do self.markdown_library = app.config.acts_as_markup.markdown_library self.mediawiki_library = app.config.acts_as_markup.mediawiki_library end end initializer 'acts_as_markup.extend_active_record', :after => 'acts_as_markup.set_config' do |app| ActiveSupport.on_load(:active_record) do require 'acts_as_markup/exts/object' require 'acts_as_markup/stringlike' require 'acts_as_markup/active_record_extension' self.send :include, ActsAsMarkup::ActiveRecordExtension end end config.before_configuration do config.acts_as_markup['markdown_library'] ||= :rdiscount config.acts_as_markup['mediawiki_library'] ||= :wikicloth end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_markup-1.4.2 | lib/acts_as_markup/railtie.rb |