muck-comments 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -3,7 +3,7 @@ class CreateComments < ActiveRecord::Migration
3
3
  create_table :comments, :force => true do |t|
4
4
  t.integer :commentable_id, :default => 0
5
5
  t.string :commentable_type, :limit => 15, :default => ""
6
- t.text :body, :default => ""
6
+ t.text :body
7
7
  t.integer :user_id, :default => 0, :null => false
8
8
  t.integer :parent_id
9
9
  t.integer :lft
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-comments}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Justin Ball"]
9
- s.date = %q{2009-06-16}
9
+ s.date = %q{2009-06-18}
10
10
  s.description = %q{The comment engine for the muck system.}
11
11
  s.email = %q{justinball@gmail.com}
12
12
  s.extra_rdoc_files = [
@@ -47,7 +47,6 @@ Gem::Specification.new do |s|
47
47
  "locales/en.yml",
48
48
  "locales/en.yml",
49
49
  "muck-comments.gemspec",
50
- "pkg/muck-comments-0.1.1.gem",
51
50
  "rails/init.rb",
52
51
  "rails/init.rb",
53
52
  "rdoc/classes/ActionController.html",
data/rdoc/created.rid CHANGED
@@ -1 +1 @@
1
- Mon, 15 Jun 2009 16:29:38 -0600
1
+ Tue, 16 Jun 2009 23:13:25 -0600
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sat Jun 13 23:15:42 -0600 2009</td>
59
+ <td>Tue Jun 16 23:04:54 -0600 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -123,6 +123,27 @@ example:
123
123
 
124
124
  end
125
125
  </pre>
126
+ <h3>Comment partial</h3>
127
+ <p>
128
+ When calling create in the comments controller with :format =&gt;
129
+ &#8216;json&#8217; the resulting json will include an &#8216;html&#8217;
130
+ field that contains a rendered version of the comment html. To facilitate
131
+ this process be sure to create a partial called
132
+ &#8216;_comment.html.erb&#8217; under a directory with the same name as the
133
+ parent object. The partial will be passed an object
134
+ &#8216;comment_owner&#8217; that references the parent object.
135
+ </p>
136
+ <p>
137
+ For example, for an object &#8216;activity&#8217; that acts_as_commentable
138
+ create a partial &#8216;activities/_comment.html.erb&#8217;. The contents
139
+ might look like this:
140
+ </p>
141
+ <pre>
142
+ &lt;div id=&quot;&lt;%= comment.dom_id %&gt;&quot;&gt;
143
+ &lt;span class=&quot;user&quot;&gt;&lt;%= link_to comment_owner.user, comment_owner.user %&gt;&lt;/span&gt;
144
+ &lt;p&gt;&lt;%= h comment.body %&gt;&lt;/p&gt;
145
+ &lt;/div&gt;
146
+ </pre>
126
147
  <p>
127
148
  Copyright (c) 2009 Justin Ball, released under the MIT license
128
149
  </p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-16 00:00:00 -06:00
12
+ date: 2009-06-18 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -61,7 +61,6 @@ files:
61
61
  - lib/muck_comments/tasks.rb
62
62
  - locales/en.yml
63
63
  - muck-comments.gemspec
64
- - pkg/muck-comments-0.1.1.gem
65
64
  - rails/init.rb
66
65
  - rdoc/classes/ActionController.html
67
66
  - rdoc/classes/ActionController/Routing.html
Binary file