mark_as_read 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b514a65b8ece9190711d84ccb55e27c003060cc5
4
- data.tar.gz: 4f3d62466c62f14f02f0a626993f0feb0e1ac7a4
3
+ metadata.gz: 851f658fb57204d5c63b559f7ec99557ca021c83
4
+ data.tar.gz: 13340ffccb6f0379c9b71d8507044beb554edbbc
5
5
  SHA512:
6
- metadata.gz: d553dd7a81c42ba80e3ffaa4704564863ef63fe6954f88d346c20c922d46df8849bc2ccab5038590abf3a872ab528ac34c0d5301ee2a1c98e751feb0060420c2
7
- data.tar.gz: 831bfab4e936aa4de2d7a0f6179c01ae9434678c8e672731b3d9c4ae86b60260d004555087f0f95db8d52274f2d8722bed0695fd1aa3d50063d86e22f418d3fa
6
+ metadata.gz: e86219c608d612e583cf44a2a00d1c541392eae43ab38597920b3e331aa1e08a8dd2ed015746f619ce0921f0d1f13257c594d816fb4c5bf2da4806bc0213f7e9
7
+ data.tar.gz: 7f34462de0c3dce0b847ae0728fe1a9d06734bd9d78e437fb55f28cb853e9bb491bd78552325bde95a76d88b9d4332111a2038f9696ce44f2bb28bfb8ed6335b
data/README.md CHANGED
@@ -20,23 +20,24 @@ Or install it yourself as:
20
20
  ## Usage
21
21
 
22
22
  Let's say you have a ``Message`` class, simply add the following to describe the behavior to execute when a message is read:
23
+ ````ruby
24
+ class Message < ActiveRecord::Base
23
25
 
24
- class Message < ActiveRecord::Base
26
+ include MarkAsRead::Readable
25
27
 
26
- include MarkAsRead::Readable
27
-
28
- mark_as_read do |message|
29
- message.update_attributes(:read => true)
30
- end
31
-
32
- end
28
+ mark_as_read do |message|
29
+ message.update_attributes(:read => true)
30
+ end
33
31
 
32
+ end
33
+ ````
34
34
  The read message is yielded to the ``mark_as_read`` function so you can do anything you want on it.
35
35
 
36
36
 
37
37
  Then, in your mailer view, you just have to add the tracking image, let's assume you have the message in the ``@message`` variable :
38
-
39
- <%= mark_as_read_img(@message) %>
38
+ ````ruby
39
+ <%= mark_as_read_img(@message) %>
40
+ ````
40
41
 
41
42
  ## Disclaimer
42
43
 
@@ -1,5 +1,4 @@
1
1
  require 'rails'
2
- require 'active_record'
3
2
 
4
3
  module MarkAsRead
5
4
  class Engine < Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module MarkAsRead
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mark_as_read
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Siami