Socket
Book a DemoInstallSign in
Socket

chatroom

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chatroom

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Chatroom

The chat room provides you to send messages that including emotions and different kinds font.

Installation

Add this line to your application's Gemfile:

gem 'chatroom'

And then execute:

$ bundle

Or install it yourself as:

$ gem install chatroom

Usage

After you install Chatroom and add it to your Gemfile, you need to run the generator:

rails g chatroom:install

Add the code below in your controller where will put the chatroom. Example:

@messages = Message.all

Add the chatroom to your view. Example:

<%= render "chatroom/messages/chatroom" %>

Migration Task:

rake db:migrate

Start faye server in your terminal:

rackup private_pub.ru -s thin -E production

#####Add User to the Message:

Add a migration and add your code to show user's name in message_helper.rb:

rails g migration add_user_id_to_messages

Add hidden field about user_id in chatroom/message_helper.rb so as create the message with its ower:

<%= f.hidden_field :user_id, :value => current_user.id %>

Allow params get the user_id in chatroom/messages_controller.rb:

	params.require(:message).permit(:content, :user_id)

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 07 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.