Simple messaging provides you with the bare basic messaging for a rails application. It will create your messaging model, views, routes and controller for two users to exchange messages between each other.
install the gem:
gem install simple-messaging
install in your rails app:
rails generate messaging:install
bin/rake db:migrate
You will now have 3 paths between two users
gets:
/message/:from_id
/messages
post:
/message/:to_id
notes: There must be a current_user logged in for messages to be exchanged