commontator 0.4.1 → 0.5.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/README.md +35 -23
  2. data/app/assets/stylesheets/commontator/comments.css +1 -1
  3. data/app/assets/stylesheets/commontator/comments.css~ +0 -4
  4. data/app/controllers/commontator/application_controller.rb +4 -5
  5. data/app/controllers/commontator/application_controller.rb~ +5 -5
  6. data/app/controllers/commontator/comments_controller.rb +30 -30
  7. data/app/controllers/commontator/comments_controller.rb~ +31 -31
  8. data/app/controllers/commontator/subscriptions_controller.rb +8 -7
  9. data/app/controllers/commontator/subscriptions_controller.rb~ +6 -7
  10. data/app/controllers/commontator/threads_controller.rb +8 -9
  11. data/app/controllers/commontator/threads_controller.rb~ +9 -10
  12. data/app/helpers/commontator/comments_helper.rb~ +14 -24
  13. data/app/helpers/commontator/subscriptions_helper.rb~ +3 -3
  14. data/app/helpers/commontator/threads_helper.rb +0 -8
  15. data/app/helpers/commontator/threads_helper.rb~ +5 -5
  16. data/app/mailers/commontator/subscriptions_mailer.rb +8 -8
  17. data/app/mailers/commontator/subscriptions_mailer.rb~ +9 -10
  18. data/app/models/commontator/comment.rb +14 -6
  19. data/app/models/commontator/comment.rb~ +15 -12
  20. data/app/views/commontator/comments/_actions.html.erb +6 -5
  21. data/app/views/commontator/comments/_actions.html.erb~ +6 -5
  22. data/app/views/commontator/comments/_body.html.erb +2 -1
  23. data/app/views/commontator/comments/_body.html.erb~ +1 -2
  24. data/app/views/commontator/comments/_form.html.erb +8 -3
  25. data/app/views/commontator/comments/_form.html.erb~ +7 -4
  26. data/app/views/commontator/comments/_show.html.erb +11 -8
  27. data/app/views/commontator/comments/_show.html.erb~ +11 -8
  28. data/app/views/commontator/comments/_votes.html.erb +7 -6
  29. data/app/views/commontator/comments/create.js.erb +4 -2
  30. data/app/views/commontator/comments/delete.js.erb +5 -3
  31. data/app/views/commontator/comments/delete.js.erb~ +5 -3
  32. data/app/views/commontator/comments/update.js.erb +1 -1
  33. data/app/views/commontator/comments/update.js.erb~ +1 -1
  34. data/app/views/commontator/comments/vote.js.erb +2 -1
  35. data/app/views/commontator/shared/_thread.html.erb +17 -0
  36. data/app/views/commontator/shared/_thread.html.erb~ +16 -0
  37. data/app/views/commontator/shared/_thread_link.html.erb~ +16 -0
  38. data/app/views/commontator/subscriptions/_link.html.erb +3 -2
  39. data/app/views/commontator/subscriptions/subscribe.js.erb +2 -1
  40. data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb +1 -1
  41. data/app/views/commontator/threads/_show.html.erb +18 -11
  42. data/app/views/commontator/threads/_show.html.erb~ +18 -11
  43. data/app/views/commontator/threads/show.js.erb +2 -1
  44. data/config/initializers/commontator.rb +14 -14
  45. data/db/migrate/0_install_commontator.rb +3 -3
  46. data/lib/commontator.rb +5 -6
  47. data/lib/commontator.rb~ +5 -6
  48. data/lib/commontator/acts_as_commontable.rb +2 -0
  49. data/lib/commontator/acts_as_commontator.rb +2 -0
  50. data/lib/commontator/controller_includes.rb +23 -0
  51. data/lib/commontator/controller_includes.rb~ +23 -0
  52. data/lib/commontator/shared_helper.rb +42 -0
  53. data/lib/commontator/shared_helper.rb~ +42 -0
  54. data/lib/commontator/shared_methods.rb~ +24 -0
  55. data/lib/commontator/version.rb +1 -1
  56. data/lib/commontator/version.rb~ +1 -1
  57. data/test/dummy/config/initializers/commontator.rb +15 -15
  58. data/test/dummy/db/development.sqlite3 +0 -0
  59. data/test/dummy/db/migrate/1_install_commontator.commontator.rb +3 -3
  60. data/test/dummy/db/schema.rb +3 -3
  61. data/test/dummy/log/development.log +64 -0
  62. metadata +10 -70
  63. data/app/assets/stylesheets/commontator/application.css~ +0 -88
  64. data/app/assets/stylesheets/commontator/threads.css~ +0 -13
  65. data/app/helpers/commontator/application_helper.rb~ +0 -11
  66. data/app/helpers/commontator/comments_helper.rb +0 -51
  67. data/app/helpers/commontator/commontable_helper.rb~ +0 -9
  68. data/app/helpers/commontator/commontator_helper.rb +0 -8
  69. data/app/helpers/commontator/commontator_helper.rb~ +0 -8
  70. data/app/helpers/commontator/subscriptions_helper.rb +0 -8
  71. data/app/mailers/commontator/subscription_mailer.rb~ +0 -38
  72. data/app/models/commontator/subscription.rb~ +0 -21
  73. data/app/models/commontator/thread.rb~ +0 -143
  74. data/app/views/commontator/comments/_votes.html.erb~ +0 -62
  75. data/app/views/commontator/comments/create.js.erb~ +0 -15
  76. data/app/views/commontator/comments/destroy.js.erb~ +0 -1
  77. data/app/views/commontator/comments/edit.html.erb~ +0 -6
  78. data/app/views/commontator/comments/edit.js.erb~ +0 -5
  79. data/app/views/commontator/comments/new.html.erb~ +0 -8
  80. data/app/views/commontator/comments/new.js.erb~ +0 -12
  81. data/app/views/commontator/comments/vote.js.erb~ +0 -5
  82. data/app/views/commontator/shared/_thread_link.html.erb +0 -13
  83. data/app/views/commontator/subscriptions/_index.html.erb~ +0 -16
  84. data/app/views/commontator/subscriptions/_link.html.erb~ +0 -15
  85. data/app/views/commontator/subscriptions/_subscription_link.html.erb~ +0 -13
  86. data/app/views/commontator/subscriptions/create.js.erb~ +0 -5
  87. data/app/views/commontator/subscriptions/destroy.js.erb~ +0 -3
  88. data/app/views/commontator/subscriptions/index.html.erb~ +0 -16
  89. data/app/views/commontator/subscriptions/subscribe.js.erb~ +0 -5
  90. data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~ +0 -6
  91. data/app/views/commontator/threads/_actions.html.erb~ +0 -28
  92. data/app/views/commontator/threads/_link.html.erb~ +0 -14
  93. data/app/views/commontator/threads/close.js.erb~ +0 -5
  94. data/app/views/commontator/threads/show.html.erb~ +0 -3
  95. data/app/views/commontator/threads/show.js.erb~ +0 -6
  96. data/config/initializers/commontator.rb~ +0 -179
  97. data/config/routes.rb~ +0 -24
  98. data/db/migrate/0_install_commontator.rb~ +0 -48
  99. data/lib/commontator/acts_as_commontable.rb~ +0 -39
  100. data/lib/commontator/acts_as_commontator.rb~ +0 -28
  101. data/lib/commontator/commontable_config.rb~ +0 -13
  102. data/lib/commontator/commontator_config.rb~ +0 -13
  103. data/lib/commontator/routes.rb~ +0 -37
  104. data/lib/tasks/commontator_tasks.rake~ +0 -41
  105. data/test/dummy/config/initializers/commontator.rb~ +0 -179
  106. data/test/dummy/config/routes.rb~ +0 -3
  107. data/test/functional/comment_thread_subscriptions_controller_test.rb~ +0 -125
  108. data/test/functional/comments_controller_test.rb~ +0 -184
  109. data/test/functional/subscriptions_controller_test.rb~ +0 -122
  110. data/test/unit/comment_test.rb~ +0 -38
  111. data/test/unit/comment_thread_subscription_test.rb~ +0 -18
  112. data/test/unit/comment_thread_test.rb~ +0 -60
  113. data/test/unit/helpers/comment_thread_subscriptions_helper_test.rb~ +0 -7
  114. data/test/unit/helpers/comments_helper_test.rb~ +0 -7
  115. data/test/unit/helpers/subscriptions_helper_test.rb~ +0 -4
  116. data/test/unit/subscription_test.rb~ +0 -15
  117. data/test/unit/thread_test.rb~ +0 -57
@@ -1,9 +1,10 @@
1
- <% # Clients of this partial must supply the following variable:
1
+ <% # Clients of this partial must supply the following variables:
2
2
  # thread
3
+ # user
3
4
  %>
4
5
 
5
- <% can_subscribe = thread.can_subscribe?(@commontator) %>
6
- <% can_edit = thread.can_be_edited_by?(@commontator) %>
6
+ <% can_subscribe = thread.can_subscribe?(user) %>
7
+ <% can_edit = thread.can_be_edited_by?(user) %>
7
8
 
8
9
  <span id="thread_<%= thread.id.to_s %>_header_span" class="thread_header">
9
10
  <%= thread.config.comment_name.capitalize.pluralize %>
@@ -13,7 +14,8 @@
13
14
  <% if can_subscribe %>
14
15
  <span id="thread_<%= thread.id.to_s %>_subscription_span" class="thread_subscription">
15
16
  <%= render :partial => 'commontator/subscriptions/link',
16
- :locals => {:thread => thread} %>
17
+ :locals => {:thread => thread,
18
+ :user => user} %>
17
19
  </span>
18
20
  <% end %>
19
21
 
@@ -23,9 +25,9 @@
23
25
  <% is_closed = thread.is_closed? %>
24
26
  <% close_string = is_closed ? "reopen" : "close" %>
25
27
  <%= link_to close_string.capitalize,
26
- polymorphic_path([close_string, thread]),
28
+ commontator.polymorphic_path([close_string, thread]),
27
29
  :confirm => (!is_closed ? \
28
- 'Are you sure you want to close this thread' : nil),
30
+ 'Are you sure you want to close this thread?' : nil),
29
31
  :method => :put,
30
32
  :id => "thread_#{thread.id.to_s}_#{close_string}_link",
31
33
  :class => "thread_#{close_string}_link" %>
@@ -34,21 +36,26 @@
34
36
 
35
37
  <div id="thread_<%= thread.id.to_s %>_comment_list_div" class="thread_comment_list">
36
38
  <% thread.ordered_comments.each do |comment| %>
37
- <% next unless comment.can_be_read_by?(@commontator) %>
39
+ <% next unless comment.can_be_read_by?(user) %>
38
40
  <%= render :partial => 'commontator/comments/show',
39
- :locals => {:comment => comment} %>
41
+ :locals => {:comment => comment,
42
+ :user => user} %>
40
43
  <% end %>
41
44
  </div>
42
45
 
43
- <% unless thread.is_closed? %>
46
+ <br/>
44
47
 
45
- <br/>
48
+ <% if thread.is_closed? %>
49
+
50
+ <p><%= thread.config.comment_name.capitalize.pluralize %> cannot be <%= thread.config.comment_create_verb_past %> at this time.</p>
51
+
52
+ <% else %>
46
53
 
47
54
  <div id="thread_<%= thread.id %>_new_comment_div" class="thread_new_comment"></div>
48
55
 
49
56
  <span id="thread_<%= thread.id %>_new_comment_link_span" class="thread_new_comment_link">
50
57
  <%= link_to thread.config.comment_create_verb_present.capitalize + ' ' + thread.config.comment_name,
51
- new_thread_comment_path(thread), :remote => true %>
58
+ commontator.new_thread_comment_path(thread), :remote => true %>
52
59
  </span>
53
60
 
54
61
  <% end %>
@@ -1,6 +1,7 @@
1
1
  $("#thread_<%= @thread.id %>_div").html(
2
2
  "<%= escape_javascript(
3
3
  render :partial => 'show',
4
- :locals => {:thread => @thread}) %>");
4
+ :locals => {:thread => @thread,
5
+ :user => @user}) %>");
5
6
 
6
7
  <%= javascript_proc %>
@@ -16,31 +16,31 @@ Commontator.configure do |config|
16
16
  config.javascript_proc = lambda { |view| '$("#error_explanation").remove();' }
17
17
 
18
18
 
19
- # Commontator (User model) Configuration
19
+ # User (acts_as_commontator) Configuration
20
20
 
21
- # The name used if the commontator's name cannot be retrieved
21
+ # The name used if the user's name cannot be retrieved
22
22
  # Default: 'Anonymous'
23
- config.commontator_missing_name = 'Anonymous'
23
+ config.user_missing_name = 'Anonymous'
24
24
 
25
- # Whether the commontator's name is clickable in the comment view
25
+ # Whether the user's name is clickable in the comment view
26
26
  # Default: false
27
- config.commontator_name_clickable = false
27
+ config.user_name_clickable = false
28
28
 
29
- # The method that return the commontator's email address
29
+ # The method that returns the user's email address
30
30
  # Default: 'email'
31
- config.commontator_email_method = 'email'
31
+ config.user_email_method = 'email'
32
32
 
33
- # The method that return the commontator's name
34
- # Default: '' (use missing name)
35
- config.commontator_name_method = ''
33
+ # The method that returns the user's name
34
+ # Default: '' (use user_missing_name)
35
+ config.user_name_method = ''
36
36
 
37
- # Method that returns true if the commontator is an admin for all threads
37
+ # Method that returns true if the user is an admin for all threads
38
38
  # Admins can always delete other users' comments and close threads
39
39
  # Default: '' (no admins)
40
40
  config.is_admin_method = ''
41
41
 
42
42
 
43
- # Commontable (Commentable model) Configuration
43
+ # Commontable (acts_as_commontable) Configuration
44
44
 
45
45
  # What a comment is called in your application
46
46
  # Default: 'comment'
@@ -70,11 +70,11 @@ Commontator.configure do |config|
70
70
  # Proc that returns the subscription email subject
71
71
  # Default:
72
72
  # lambda do |params|
73
- # "#{params[:commontator_name]} #{params[:config].comment_create_verb_past} a " + \
73
+ # "#{params[:creator_name]} #{params[:config].comment_create_verb_past} a " + \
74
74
  # "#{params[:config].comment_name} on #{params[:commontable_name]} ##{params[:commontable_id]}"
75
75
  # end
76
76
  config.subscription_email_subject_proc = lambda do |params|
77
- "#{params[:commontator_name]} #{params[:config].comment_create_verb_past} a " + \
77
+ "#{params[:creator_name]} #{params[:config].comment_create_verb_past} a " + \
78
78
  "#{params[:config].comment_name} on #{params[:commontable_name]} ##{params[:commontable_id]}"
79
79
  end
80
80
 
@@ -2,8 +2,8 @@ class InstallCommontator < ActiveRecord::Migration
2
2
  def change
3
3
  create_table "commontator_comments" do |t|
4
4
  t.text "body"
5
- t.integer "commontator_id"
6
- t.string "commontator_type"
5
+ t.integer "creator_id"
6
+ t.string "creator_type"
7
7
  t.datetime "deleted_at"
8
8
  t.integer "deleter_id"
9
9
  t.string "deleter_type"
@@ -35,7 +35,7 @@ class InstallCommontator < ActiveRecord::Migration
35
35
  t.timestamps
36
36
  end
37
37
 
38
- add_index :commontator_comments, [:commontator_id, :commontator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
38
+ add_index :commontator_comments, [:creator_id, :creator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
39
39
  add_index :commontator_comments, :thread_id
40
40
  add_index :commontator_subscriptions, [:subscriber_id, :subscriber_type, :thread_id], :unique => true, :name => "index_c_s_on_s_id_and_s_type_and_t_id"
41
41
  add_index :commontator_subscriptions, :thread_id
data/lib/commontator.rb CHANGED
@@ -9,10 +9,10 @@ module Commontator
9
9
 
10
10
  # Can be set in initializer or passed as an option to acts_as_commontator
11
11
  COMMONTATOR_ATTRIBUTES = [
12
- :commontator_missing_name,
13
- :commontator_name_clickable,
14
- :commontator_email_method,
15
- :commontator_name_method,
12
+ :user_missing_name,
13
+ :user_name_clickable,
14
+ :user_email_method,
15
+ :user_name_method,
16
16
  :is_admin_method
17
17
  ]
18
18
 
@@ -58,7 +58,6 @@ module Commontator
58
58
  end
59
59
 
60
60
  require 'commontator/engine'
61
- require 'commontator/commontator_config'
62
- require 'commontator/commontable_config'
63
61
  require 'commontator/acts_as_commontator'
64
62
  require 'commontator/acts_as_commontable'
63
+ require 'commontator/controller_includes'
data/lib/commontator.rb~ CHANGED
@@ -9,10 +9,10 @@ module Commontator
9
9
 
10
10
  # Can be set in initializer or passed as an option to acts_as_commontator
11
11
  COMMONTATOR_ATTRIBUTES = [
12
- :commontator_no_name,
13
- :commontator_name_clickable,
14
- :commontator_email_method,
15
- :commontator_name_method,
12
+ :user_missing_name,
13
+ :user_name_clickable,
14
+ :user_email_method,
15
+ :user_name_method,
16
16
  :is_admin_method
17
17
  ]
18
18
 
@@ -58,7 +58,6 @@ module Commontator
58
58
  end
59
59
 
60
60
  require 'commontator/engine'
61
- require 'commontator/commontator_config'
62
- require 'commontator/commontable_config'
63
61
  require 'commontator/acts_as_commontator'
64
62
  require 'commontator/acts_as_commontable'
63
+ require 'commontator/shared_methods'
@@ -1,3 +1,5 @@
1
+ require 'commontator/commontable_config'
2
+
1
3
  module Commontator
2
4
  module ActsAsCommontable
3
5
  def self.included(base)
@@ -1,3 +1,5 @@
1
+ require 'commontator/commontator_config'
2
+
1
3
  module Commontator
2
4
  module ActsAsCommontator
3
5
  def self.included(base)
@@ -0,0 +1,23 @@
1
+ require 'commontator/shared_helper'
2
+
3
+ module Commontator
4
+ module ControllerIncludes
5
+ def self.included(base)
6
+ base.helper Commontator::SharedHelper
7
+ end
8
+
9
+ protected
10
+
11
+ def commontator_thread_show(commontable)
12
+ user = send Commontator.current_user_method
13
+ raise SecurityTransgression unless (user.nil? || user.is_commontator)
14
+
15
+ thread = commontable.thread
16
+ raise SecurityTransgression unless thread.can_be_read_by?(user)
17
+ thread.mark_as_read_for(user)
18
+ @commontator_thread_show = true
19
+ end
20
+ end
21
+ end
22
+
23
+ ActionController::Base.send :include, Commontator::ControllerIncludes
@@ -0,0 +1,23 @@
1
+ require 'commontator/shared_helper'
2
+
3
+ module Commontator
4
+ module ControllerIncludes
5
+ def self.included(base)
6
+ base.helper Commontator::SharedHelper
7
+ end
8
+
9
+ protected
10
+
11
+ def commontator_thread_show(commontable)
12
+ user = send Commontator.current_user_method
13
+ raise SecurityTransgression unless (@user.nil? || @user.is_commontator)
14
+
15
+ thread = commontable.thread
16
+ raise SecurityTransgression unless thread.can_be_read_by?(user)
17
+ thread.mark_as_read_for(user)
18
+ @commontator_thread_show = true
19
+ end
20
+ end
21
+ end
22
+
23
+ ActionController::Base.send :include, Commontator::ControllerIncludes
@@ -0,0 +1,42 @@
1
+ module Commontator
2
+ module SharedHelper
3
+ def commontator_thread(commontable)
4
+ user = send Commontator.current_user_method
5
+
6
+ render(:partial => 'commontator/shared/thread',
7
+ :locals => {:thread => commontable.thread,
8
+ :user => user}).html_safe
9
+ end
10
+
11
+ def commontator_name(user)
12
+ return Commontator.user_missing_name if user.nil?
13
+ config = user.commontator_config
14
+ config.user_name_method.blank? ? config.user_missing_name : \
15
+ user.send(config.user_name_method)
16
+ end
17
+
18
+ def commontator_email(user)
19
+ return '' if user.nil?
20
+ config = user.commontator_config
21
+ config.user_email_method.blank? ? '' : user.send(config.user_email_method)
22
+ end
23
+
24
+ def commontator_gravatar_url(user, options = {})
25
+ options[:secure] ||= request.ssl?
26
+ options[:size] ||= 50
27
+
28
+ hash = Digest::MD5.hexdigest(commontator_email(user))
29
+ base = options[:secure] ? "s://secure" : "://www"
30
+
31
+ "http#{base}.gravatar.com/avatar/#{hash}?s=#{options[:size]}"
32
+ end
33
+
34
+ def commontator_gravatar_image(user, options = {})
35
+ name = commontator_name(user)
36
+ image_tag(commontator_gravatar_url(user, options),
37
+ { :alt => name,
38
+ :title => name,
39
+ :border => 1 })
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ module Commontator
2
+ module SharedHelper
3
+ def commontator_thread(commontable)
4
+ user = send Commontator.current_user_method
5
+
6
+ render(:partial => 'commontator/shared/thread',
7
+ :locals => {:thread => commontable.thread,
8
+ :user => user}).html_safe
9
+ end
10
+
11
+ def commontator_name(user)
12
+ return Commontator.user_missing_name if user.nil?
13
+ config = user.commontator_config
14
+ config.user_name_method.blank? ? config.user_missing_name : \
15
+ user.send(config.user_name_method)
16
+ end
17
+
18
+ def commontator_email(user)
19
+ return '' if user.nil?
20
+ config = user.commontator_config
21
+ config.email_method.blank? ? '' : user.send(config.user_email_method)
22
+ end
23
+
24
+ def commontator_gravatar_url(user, options = {})
25
+ options[:secure] ||= request.ssl?
26
+ options[:size] ||= 50
27
+
28
+ hash = Digest::MD5.hexdigest(commontator_email(user))
29
+ base = options[:secure] ? "s://secure" : "://www"
30
+
31
+ "http#{base}.gravatar.com/avatar/#{hash}?s=#{options[:size]}"
32
+ end
33
+
34
+ def commontator_gravatar_image(user, options = {})
35
+ name = commontator_name(user)
36
+ image_tag(commontator_gravatar_url(user, options),
37
+ { :alt => name,
38
+ :title => name,
39
+ :border => 1 })
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,24 @@
1
+ require 'commontator/shared_helper'
2
+
3
+ module Commontator
4
+ module SharedMethods
5
+ def self.included(base)
6
+ base.helper Commontator::SharedHelper
7
+ end
8
+
9
+ protected
10
+
11
+ def commontator_thread_show(commontable)
12
+ user = send Commontator.current_user_method
13
+ raise SecurityTransgression unless (user.nil? || user.is_commontator)
14
+
15
+ thread = commontable.thread
16
+ raise SecurityTransgression unless thread.can_be_read_by?(user)
17
+ thread.mark_as_read_for(user)
18
+ @commontator_thread_show = true
19
+ end
20
+ end
21
+ end
22
+
23
+ ActionController::Base.send :include, Commontator::SharedMethods
24
+ ActionMailer::Base.send :include, Commontator::SharedMethods
@@ -1,3 +1,3 @@
1
1
  module Commontator
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.12"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Commontator
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.11"
3
3
  end
@@ -16,31 +16,31 @@ Commontator.configure do |config|
16
16
  config.javascript_proc = lambda { |view| '$("#error_explanation").remove();' }
17
17
 
18
18
 
19
- # Commontator (User model) Configuration
19
+ # User (acts_as_commontator) Configuration
20
20
 
21
- # The name used if the commontator's name cannot be retrieved
21
+ # The name used if the user's name cannot be retrieved
22
22
  # Default: 'Anonymous'
23
- config.commontator_missing_name = 'Anonymous'
23
+ config.user_missing_name = 'Anonymous'
24
24
 
25
- # Whether the commontator's name is clickable in the comment view
25
+ # Whether the user's name is clickable in the comment view
26
26
  # Default: false
27
- config.commontator_name_clickable = false
27
+ config.user_name_clickable = false
28
28
 
29
- # The method that return the commontator's email address
29
+ # The method that returns the user's email address
30
30
  # Default: 'email'
31
- config.commontator_email_method = 'email'
31
+ config.user_email_method = 'email'
32
32
 
33
- # The method that return the commontator's name
34
- # Default: '' (use missing name)
35
- config.commontator_name_method = ''
33
+ # The method that returns the user's name
34
+ # Default: '' (use user_missing_name)
35
+ config.user_name_method = ''
36
36
 
37
- # Method that returns true if the commontator is an admin for all threads
37
+ # Method that returns true if the user is an admin for all threads
38
38
  # Admins can always delete other users' comments and close threads
39
39
  # Default: '' (no admins)
40
40
  config.is_admin_method = ''
41
41
 
42
42
 
43
- # Commontable (Commentable model) Configuration
43
+ # Commontable (acts_as_commontable) Configuration
44
44
 
45
45
  # What a comment is called in your application
46
46
  # Default: 'comment'
@@ -60,7 +60,7 @@ Commontator.configure do |config|
60
60
  # as an argument to acts_as_commontable in each one
61
61
  # Default: 'commontable'
62
62
  config.commontable_name = 'commontable'
63
-
63
+
64
64
  # Proc that returns the commontable url that contains the thread
65
65
  # (defaults to the commontable show url)
66
66
  # Main application's routes can be accessed using main_app object
@@ -70,11 +70,11 @@ Commontator.configure do |config|
70
70
  # Proc that returns the subscription email subject
71
71
  # Default:
72
72
  # lambda do |params|
73
- # "#{params[:commontator_name]} #{params[:config].comment_create_verb_past} a " + \
73
+ # "#{params[:creator_name]} #{params[:config].comment_create_verb_past} a " + \
74
74
  # "#{params[:config].comment_name} on #{params[:commontable_name]} ##{params[:commontable_id]}"
75
75
  # end
76
76
  config.subscription_email_subject_proc = lambda do |params|
77
- "#{params[:commontator_name]} #{params[:config].comment_create_verb_past} a " + \
77
+ "#{params[:creator_name]} #{params[:config].comment_create_verb_past} a " + \
78
78
  "#{params[:config].comment_name} on #{params[:commontable_name]} ##{params[:commontable_id]}"
79
79
  end
80
80