Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luizpicolo/tawk-rails
:telephone_receiver: Rails simple helper for Tawk.to live chat script
https://github.com/luizpicolo/tawk-rails
chat rails ruby ruby-on-rails
Last synced: 22 days ago
JSON representation
:telephone_receiver: Rails simple helper for Tawk.to live chat script
- Host: GitHub
- URL: https://github.com/luizpicolo/tawk-rails
- Owner: luizpicolo
- License: mit
- Created: 2015-09-29T20:50:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-06T11:39:07.000Z (over 1 year ago)
- Last Synced: 2024-12-30T10:58:09.600Z (26 days ago)
- Topics: chat, rails, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 18.6 KB
- Stars: 25
- Watchers: 5
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# TawkRails
[![Gem Version](https://badge.fury.io/rb/tawk_rails.svg)](http://badge.fury.io/rb/tawk_rails)
[![Build Status](https://travis-ci.org/luizpicolo/tawk-rails.svg?branch=master)](https://travis-ci.org/luizpicolo/tawk-rails)Rails simple helper for [Tawk](https://www.tawk.to/) live chat script. Work rails >= 4
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'tawk_rails'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install tawk_rails
## Usage
Create file `tawk.rb` in `config/initializers/tawk.rb` and add
```ruby
TawkRails.configure do |config|
config.id_site = 'replace-me-with-your-id_site'
end
```Place render method where you want in view.
<%= tawk_init %>
Make sure to put `tawk_init` into HTML body if you use Turbolinks.
You can pass js methods as string to the helper https://www.tawk.to/javascript-api/
<%= tawk_init "Tawk_API.onStatusChange = function(status){console.log(status);}; Tawk_API.visitor = {name : 'Name', email : '[email protected]'};" %>
## Contributing
1. Fork it ( https://github.com/luizpicolo/tawk_rails/fork )
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