Sha256: 857f99f09dd8788aba054ee0578ff1c293feac8848f1262a455e3db800c270b5
Contents?: true
Size: 566 Bytes
Versions: 9
Compression:
Stored size: 566 Bytes
Contents
require 'polygallery/view_helpers' require 'polygallery/glue' module Polygallery require 'rails' class Railtie < Rails::Railtie initializer "polygallery.insert_into_active_record" do |app| ActiveSupport.on_load :active_record do Polygallery::Railtie.insert end end initializer "polygallery.view_helpers" do ActionView::Base.send :include, ViewHelpers end end class Railtie def self.insert if defined?(ActiveRecord) ActiveRecord::Base.send(:include, Polygallery::Glue) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems