Sha256: ab4a67e2e5edf8edd9f6200a3ed9e79fb2abeff7254d8d7c964384c09eaa8559

Contents?: true

Size: 388 Bytes

Versions: 5

Compression:

Stored size: 388 Bytes

Contents

module ActiveRecord
  module Acts
    module FeatureableAdditions
      def self.included(base)
        base.extend ClassMethods
      end

      module ClassMethods
        def acts_as_featureable
          has_many :features, :as => :featureable, :dependent => :destroy
        end
      end
    end
  end
end

ActiveRecord::Base.send(:include, ActiveRecord::Acts::FeatureableAdditions)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
acts_as_featureable-0.0.7 lib/acts_as_featureable/featureable_additions.rb
acts_as_featureable-0.0.6 lib/acts_as_featureable/featureable_additions.rb
acts_as_featureable-0.0.5 lib/acts_as_featureable/featureable_additions.rb
acts_as_featureable-0.0.4 lib/acts_as_featureable/featureable_additions.rb
acts_as_featureable-0.0.3 lib/acts_as_featureable/featureable_additions.rb