Skip to content

How to add new activity objects

atd edited this page Mar 24, 2013 · 8 revisions

Social Stream allows developers to write and integrate custom models in the social network.

Activity objects already available

Social Stream components already provide your application with the most popular activity objects (for instance social_stream-documents provides with files, pictures, audio and video support) These gems automatically integrate new activity objects with the rest of Social Stream, in the wall form, the search engine, etc.

Just include the desired components in your Gemfile.

Besides, some aspects can be customized in the file config/initializers/social_stream.rb, which should be copied to your application in the install rake task, and should look like https://github.com/ging/social_stream/blob/master/base/lib/generators/social_stream/base/templates/initializer.rb

Creating new activity objects

For adding new features on social_stream, remember:

  • All activity object models should include SocialStream::Models::Object and include an activity_object_id integer field in their table.

  • Include them in config/initializers/social_stream.rb so they are available in for forms, search engine, etc. See the application' config/initializers/social_stream.rb for more details.

Clone this wiki locally