Sha256: 34a6911321fcb86e464e8c6249644e14985694ba015ce9c6cec862e99784687f
Contents?: true
Size: 925 Bytes
Versions: 1
Compression:
Stored size: 925 Bytes
Contents
module Gmaps4rails require 'rails' require 'gmaps4rails/base' class Engine < Rails::Engine initializer "gmaps4rails view helpers" do |app| ActionView::Base.send :include, Gmaps4railsHelper end initializer "add asset directories to pipeline" do |app| if Rails::VERSION::MAJOR >= 3 && Rails::VERSION::MINOR >= 1 app.config.assets.paths << "#{root}/public/stylesheets" else app.middleware.use ::ActionDispatch::Static, "#{root}/public" end end end class Railtie < Rails::Railtie initializer "include acts_as_gmappable within ORM" do ActiveSupport.on_load(:active_record) do ActiveRecord::Base.send(:include, Gmaps4rails::ActsAsGmappable) end ActiveSupport.on_load(:mongoid) do Mongoid::Document.send(:include, Gmaps4rails::ActsAsGmappable) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gmaps4rails-1.4.8 | lib/gmaps4rails.rb |