Sha256: d5e24ab5f1122a46c2c316b36e9c0c20049a14aa5b2f96f238b8c4c3e7311233

Contents?: true

Size: 365 Bytes

Versions: 9

Compression:

Stored size: 365 Bytes

Contents

require 'active_record/railtie'
require 'active_support/core_ext'

module ActsAsMessageable
  class Railtie < Rails::Railtie
    if defined?(ActiveRecord::Base)
      ActiveRecord::Base.send :include, ActsAsMessageable::Model
    end

    if defined?(ActiveRecord::Relation)
      ActiveRecord::Relation.send :include, ActsAsMessageable::Relation
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
acts-as-messageable-0.4.10 lib/acts-as-messageable/railtie.rb
acts-as-messageable-0.4.9 lib/acts-as-messageable/railtie.rb
acts-as-messageable-0.4.8 lib/acts-as-messageable/railtie.rb
acts-as-messageable-0.4.7 lib/acts-as-messageable/railtie.rb
acts-as-messageable-0.4.6 lib/acts-as-messageable/railtie.rb
acts-as-messageable-0.4.5 lib/acts-as-messageable/acts-as-messageable.rb
acts-as-messageable-0.4.4 lib/acts-as-messageable/acts-as-messageable.rb
acts-as-messageable-0.4.3 lib/acts-as-messageable/acts-as-messageable.rb
acts-as-messageable-0.4.2 lib/acts-as-messageable/acts-as-messageable.rb