README.md in acts_as_chattable-0.0.1 vs README.md in acts_as_chattable-0.0.2
- old
+ new
@@ -1,10 +1,12 @@
ActsAsChattable
=================
-The Acts As Chattable allows communication between the models.
+The Acts As Chattable allows communication between models.
+It was designed for a mobile app that needs private communications with attachments, like the iPhone SMS app for example.
+
[](http://travis-ci.org/LTe/acts-as-messageable)
[](https://gemnasium.com/LTe/acts-as-messageable)
[](https://codeclimate.com/github/LTe/acts-as-messageable)
[](https://coveralls.io/r/LTe/acts-as-messageable?branch=master)
[](http://badge.fury.io/rb/acts-as-messageable)
@@ -31,40 +33,40 @@
Usage
=====
```ruby
class User < ActiveRecord::Base
- acts_as_messageable :required => :body # default [:body]
- :dependent => :destroy # default :nullify
+ acts_as_chattable :required => :body # default [:body]
+ :dependent => :destroy # default :nullify
end
```
Send message
============
```ruby
@alice = User.first
@bob = User.last
-@alice.send_message(@bob, "Message topic", "Hi bob!")
-@bob.send_message(@alice, "Re: Message topic", "Hi alice!")
+@alice.send_message(@bob, "Hi bob!")
+@bob.send_message(@alice, Hi alice!")
```
## With hash
```ruby
-@alice.send_message(@bob, { :body => "Hash body", :topic => "Hash topic" })
+@alice.send_message(@bob, { :body => "Hash body" })
```
Custom required (validation)
============================
In User model
```ruby
class User < ActiveRecord::Base
- acts_as_messageable :required => :body
+ acts_as_chattable :required => :body
end
```
## With hash
@@ -76,59 +78,10 @@
```ruby
@alice.send_message(@bob, "body")
```
-## Required sequence
-
-```ruby
-class User < ActiveRecord::Base
- acts_as_messageable :required => [:body, :topic]
-end
-
-@alice.send_message(@bob, "body", "topic")
-```
-
-## First topic
-
-```ruby
-class User < ActiveRecord::Base
- acts_as_messageable :required => [:topic, :body]
-end
-
-@alice.send_message(@bob, "topic", "body")
-```
-
-Custom class
-============
-
-You can use your own class that will represent the message object. First of all create custom class
-
-```ruby
-class CustomMessage < ActsAsMessageable::Message
- def capitalize_title
- title.capitalize
- end
-end
-```
-
-After that you can sepcify custom class in options.
-
-```ruby
-class User
- acts_as_messageable :class_name => "CustomMessage"
-end
-```
-
-From now on, your message has custom class.
-
-```ruby
-@message = @alice.send_message(@bob, "hi!")
-@message # => #<CustomMessage:0x000000024b6278>
-@message.capitalize_title # => "Hi!"
-```
-
Conversation
============
You can get conversation list from messages scope. For example:
@@ -286,42 +239,26 @@
```ruby
@alice.restore_message(@message) # @alice restore message from trash
```
-Group message
-=============
-## Enable group messages
-
-```ruby
-class User
- acts_as_messageable :group_messages => true
-end
-```
-
-## How to join other users's conversation
-
-```ruby
-@message = @alice.send_message(@bob, :topic => "Helou bob!", :body => "What's up?")
-@reply_message = @sukhi.reply_to(@message, "Hi there!", "I would like to join to this conversation!")
-@sec_reply_message = @bob.reply_to(@message, "Hi!", "Fine!")
-@third_reply_message = @alice.reply_to(@reply_message, "hi!", "no problem")
-```
-
-## Know the people involved in conversation
-
-```ruby
-@message.people # will give you participants users object
-@message.people # => [@alice, @bob, @sukhi]
-```
-
Search
======
## Search text from messages
```ruby
@alice.messages.search("Search me") @alice seach text "Search me" from all messages
```
-Copyright © 2011-2012 Piotr Niełacny (http://ruby-blog.pl), released under the MIT license
+Gem
+===========
+```
+rspec spec
+rake gemspec
+gem build acts_as_chattable.gemspec
+gem push acts_as_chattable-0.0.x.gem
+
+
+
+Copyright © 2013 Ben Bruscella, released under the MIT license