Sha256: c106648c5b40eb4787059d6ca5649ecaf5b1c03c9df2bcf9126214baa88120c7

Contents?: true

Size: 1016 Bytes

Versions: 2

Compression:

Stored size: 1016 Bytes

Contents

# Slacked

A simple and easy way to send notifications to Slack from your Rails application. A use case for this would be to post a notification in Slack when a new User is created or a certain action has been taken in your application.

## Getting Started

Add this line to your application's Gemfile:

```ruby
gem 'slacked'
```

And then execute:

    $ bundle

Then run the installer:

    $ bundle exec rails g slacked:install

This will create a .env file in the root of the rails appication. Specify the Webhook Url and the message to be sent.

```ruby
SLACK_WEBHOOK= "WEBHOOK_URL"
SLACK_MESSAGE= "TEST"
```


## Usage

To send the message to slack use the method:

```ruby
Slacked.post
```

## Example

```ruby
class Post < ActiveRecord::Base
  after_create :slacked

  private
  
  def slacked
    Slacked.post
  end
end
```

## Contributors

- [Sean H.](https://github.com/seathony)

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slacked-0.7.0 README.md
slacked-0.6.0 README.md