Giter Site home page Giter Site logo

inboxes's Introduction

#Inboxes

Inboxes is a young messaging system for Rails app. It:

  • provides 3 models for developers: Discussion, Message and Speaker
  • read/unread discussions counter
  • any user can be invited to discussion by the member of this discussion, so you can chat with unlimited number of users

##Requirements and recommendations

Inboxes requires Rails 3.x and Devise for user identification (surely, messaging system is not possible without users). Now the gem is tested only with Ruby 1.8.7 and REE.

We recommend to use Inboxes with Faye, because it's really sexy with it.

Remember that unfortunately, Inboxes reserve 3 resources names: Discussion, Message and Speaker.

##Installation

Make sure that Devise is already installed and configured in your app!

  1. Add gem "inboxes", "~> 0.1.2" to the Gemfile and run bundle install
  2. Execute rails generate inboxes:install. This command will generate migration for messaging system. Don't forget to run migrations: rake db:migrate
  3. Add has_inboxes to your User model like here
  4. Now Inboxes are ready to use. Open http://yoursite.dev/discussions to see the list of discussions. You can start new one.

Default Inboxes views are ugly, so you can copy into your app and make anything with them: rails generate inboxes:views If you have problems with installation, you can check code of demo app

I18n

By default, the gem provides localized phrases for Russian and English languages. You can easily override any of them. Here is list of all I18n phrases.

#Integration with Faye

You can watch the demo of integration on YouTube

  1. Add gem "faye" to your Gemfile and run bundle install. Install Faye by the screencast

  2. Create messaging.js in app/assets/javascripts/ with this line: //= require inboxes/faye

  3. Copy or replace 2 views from Inboxes example app to your application: app/views/inboxes/messages/_form and app/views/inboxes/messages/create

  4. Add config parameters to your application config (last 2 are not necessary):

config.inboxes.faye_enabled = true
config.inboxes.faye_host = "inboxes-app.dev" # localhost by default
config.inboxes.faye_port = 9292 # 9292 by default
  1. Faye installation is finished. If you have any troubles, check the example app

While testing Inboxes with Faye, don't forget to run it: rackup faye.ru -s thin -E production You can read more about Faye on it's official page.

Hints

  1. If you want to add breadcrumbs to Inboxes pages, we recommend you to use crummy gem. It allows to define breadcrumbs in views.

##Todo

  • Add RSpec tests

##Contributors

##Feel free for pull requests!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.