-
Notifications
You must be signed in to change notification settings - Fork 0
How to add new activity types
Social Stream allows developers to write and integrate different models that grant the users with new kind of activities.
There are already gems that add new activity types to social_stream-base
(for instance social_stream-documents
) These gems automatically integrate new activity types with the rest of Social Stream, for instance, in the new activity form, the search engine, etc.
However, these aspects can be customized in the file config/initializer/social_stream.rb
, which should be copied to your application in the install rake task, and should look like the file at https://github.com/ging/social_stream/blob/master/base/lib/generators/social_stream/base/templates/initializer.rb
For adding new features on social_stream with diferent activities, remember:
-
All activities' models should
include SocialStream::Modules::Object
and include anactivity_object_id
integer field in their table. -
Include them in
config/initializer/social_strem.rb
so they are available in for forms, search engine, etc. See the application'config/initializer/social_strem.rb
for more details.