Sha256: 90edd4d661f2e898c350c71a1a6ef9d7fd1b5feda2e6700870adc30f2b1b1c19

Contents?: true

Size: 845 Bytes

Versions: 1

Compression:

Stored size: 845 Bytes

Contents

= Streamit (Under development)

Provides feed stream like feature to rails apps

stream.rb

  class Stream
    include MongoMapper::Document
    include Streamit::ORM::MongoMapper
  end

"he9lin started watching auction ipad a minute ago"

en.yml

  en:
    streamit:
      watching:
        create: "started watching"

watching.rb

  class Watching < ActiveRecord::Base
    belongs_to :watcher,      :class_name => "User", :foreign_key => "user_id"
    belongs_to :watched_item, :class_name => "Item", :foreign_key => "item_id"
  
    stream :create, :actor    => :watcher,
                    :receiver => :watched_item
  end

"he9lin edited profile image just now"

en.yml

  en:
    users:
      update:
        image_url: "edited profile image"

user.rb

  class User < ActiveRecord::Base
    stream :update, :attributes => :image_url
  end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
streamit-0.0.6.2 README.rdoc