Sha256: 1f3f0a7147bef3b5f06bc0b431fb9165f05eac7b6dd28407e71f40eff64f6470

Contents?: true

Size: 712 Bytes

Versions: 9

Compression:

Stored size: 712 Bytes

Contents

module ActiveRecord
  module Acts #:nodoc:
    module MuckSharer #:nodoc:
      def self.included(base)
        base.extend(ClassMethods)
      end

      module ClassMethods

        def acts_as_muck_sharer(options = {})
          has_many :shares, :dependent => :destroy, :order => 'created_at ASC', :foreign_key => :shared_by_id
          include ActiveRecord::Acts::MuckSharer::InstanceMethods
          extend ActiveRecord::Acts::MuckSharer::SingletonMethods
        end
      end

      # class methods
      module SingletonMethods

      end
      
      # All the methods available to a record that has had <tt>acts_as_muck_share</tt> specified.
      module InstanceMethods

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
muck-shares-0.1.8 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.7 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.6 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.5 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.4 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.1 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.2 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.3 lib/active_record/acts/muck_sharer.rb
muck-shares-0.1.0 lib/active_record/acts/muck_sharer.rb