Sha256: 4544b6ef1656ad141f52a0301d23b4be7a299dc975612f09ed3af0faad4ab7d1
Contents?: true
Size: 659 Bytes
Versions: 18
Compression:
Stored size: 659 Bytes
Contents
require 'polyblock/view_helpers' require 'polyblock/glue' module Polyblock require 'rails' class Railtie < Rails::Railtie initializer "polyblock.insert_into_active_record" do |app| ActiveSupport.on_load :active_record do Polyblock::Railtie.insert end end initializer "polyblock.view_helpers" do ActionView::Base.send :include, ViewHelpers end # initializer "polyblock.capybara_helpers" do # RSpec.send :include, CapybaraHelpers # end end class Railtie def self.insert if defined?(ActiveRecord) ActiveRecord::Base.send(:include, Polyblock::Glue) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems