Sha256: 195197ebe56c9bbcd62003525bde5f82da7b7588efd0ec8e4d3dbb74e6683b4c

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

# SharpSocial

[![Build Status](https://travis-ci.org/SharpV/sharp_social.png?branch=master)](https://travis-ci.org/SharpV/sharp_social)

## Installation

Add this line to your application's Gemfile:

    gem 'sharp_social'


And then execute:

    $ bundle
    $ rails g sharp_social install

Or install it yourself as:

    $ gem install sharp_social

## Usage

### setup

Add `acts_as_actor` to your model which need to act as an actor

```ruby
class User < ActiveRecord::Base
  ...
  acts_as_actor
  ...
end
```

### API

```ruby
@user.follow(@other_user)
@user.is_following?(@other_user) => true
@other_user.is_followed(@user) => true

@user.followings_count => 1
@other_user.follower_count => 1

@other_user.follow!(@user)
@other_user.is_friend(@other_user) => true
@user.is_friend?(@other_user) => true

```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sharp_social-0.1.1 README.md