commontator 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/README.md +1 -1
  2. data/Rakefile +2 -20
  3. data/lib/commontator.rb +4 -2
  4. data/lib/commontator.rb~ +7 -5
  5. data/lib/commontator/acts_as_commontable.rb +1 -1
  6. data/lib/commontator/acts_as_commontable.rb~ +2 -2
  7. data/lib/commontator/security_transgression.rb +2 -1
  8. data/lib/commontator/security_transgression.rb~ +3 -0
  9. data/lib/commontator/version.rb +1 -1
  10. data/lib/commontator/version.rb~ +1 -1
  11. data/lib/tasks/commontator_tasks.rake +1 -0
  12. data/lib/tasks/commontator_tasks.rake~ +41 -0
  13. data/spec/app/controllers/commontator/comments_controller_spec.rb +1 -1
  14. data/spec/app/controllers/commontator/comments_controller_spec.rb~ +8 -8
  15. data/spec/app/controllers/commontator/subscriptions_controller_spec.rb +1 -1
  16. data/spec/app/controllers/commontator/subscriptions_controller_spec.rb~ +1 -1
  17. data/spec/app/controllers/commontator/threads_controller_spec.rb +1 -1
  18. data/spec/app/controllers/commontator/threads_controller_spec.rb~ +110 -110
  19. data/spec/app/helpers/commontator/application_helper_spec.rb +2 -0
  20. data/spec/app/helpers/commontator/application_helper_spec.rb~ +1 -1
  21. data/spec/app/helpers/commontator/threads_helper_spec.rb +1 -1
  22. data/spec/app/helpers/commontator/threads_helper_spec.rb~ +1 -1
  23. data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb +1 -1
  24. data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb~ +2 -2
  25. data/spec/app/models/commontator/comment_observer_spec.rb +1 -1
  26. data/spec/app/models/commontator/comment_observer_spec.rb~ +1 -1
  27. data/spec/app/models/commontator/comment_spec.rb +1 -1
  28. data/spec/app/models/commontator/comment_spec.rb~ +1 -1
  29. data/spec/app/models/commontator/subscription_spec.rb +1 -1
  30. data/spec/app/models/commontator/subscription_spec.rb~ +22 -22
  31. data/spec/app/models/commontator/thread_spec.rb +1 -1
  32. data/spec/app/models/commontator/thread_spec.rb~ +2 -2
  33. data/spec/dummy/README.md +1 -1
  34. data/spec/dummy/README.md~ +1 -1
  35. data/spec/dummy/Rakefile~ +7 -0
  36. data/spec/dummy/config/initializers/commontator.rb +1 -1
  37. data/spec/dummy/db/development.sqlite3 +0 -0
  38. data/spec/dummy/db/migrate/{0_create_dummy_models.rb → 1_create_dummy_models.rb} +0 -0
  39. data/spec/dummy/db/migrate/{1_create_dummy_users.rb → 2_create_dummy_users.rb} +0 -0
  40. data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb +4 -1
  41. data/spec/dummy/db/schema.rb +3 -0
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/dummy/log/development.log +466 -15153
  44. data/spec/dummy/log/test.log +7183 -178543
  45. data/spec/lib/commontator/acts_as_commontable_spec.rb +1 -1
  46. data/spec/lib/commontator/acts_as_commontable_spec.rb~ +1 -1
  47. data/spec/lib/commontator/acts_as_commontator_spec.rb +1 -1
  48. data/spec/lib/commontator/acts_as_commontator_spec.rb~ +1 -1
  49. data/spec/lib/commontator/commontable_config_spec.rb +1 -1
  50. data/spec/lib/commontator/commontable_config_spec.rb~ +6 -6
  51. data/spec/lib/commontator/commontator_config_spec.rb +1 -1
  52. data/spec/lib/commontator/commontator_config_spec.rb~ +6 -6
  53. data/spec/lib/commontator/controller_includes_spec.rb +1 -1
  54. data/spec/lib/commontator/controller_includes_spec.rb~ +1 -1
  55. data/spec/lib/commontator/shared_helper_spec.rb +1 -1
  56. data/spec/lib/commontator/shared_helper_spec.rb~ +1 -1
  57. data/spec/lib/commontator_spec.rb +1 -1
  58. data/spec/lib/commontator_spec.rb~ +4 -4
  59. data/spec/{spec_helper.rb → minitest_helper.rb} +0 -1
  60. data/spec/minitest_helper.rb~ +35 -0
  61. data/spec/spec_helper.rb~ +7 -1
  62. metadata +153 -241
  63. data/app/assets/stylesheets/commontator/comments.css~ +0 -83
  64. data/app/assets/stylesheets/commontator/threads.css~ +0 -18
  65. data/app/controllers/commontator/application_controller.rb~ +0 -28
  66. data/app/controllers/commontator/comments_controller.rb~ +0 -135
  67. data/app/controllers/commontator/commontator_controller.rb~ +0 -22
  68. data/app/controllers/commontator/subscriptions_controller.rb~ +0 -33
  69. data/app/controllers/commontator/threads_controller.rb~ +0 -41
  70. data/app/helpers/commontator/comments_helper.rb~ +0 -41
  71. data/app/helpers/commontator/commontator_helper.rb~ +0 -7
  72. data/app/helpers/commontator/subscriptions_helper.rb~ +0 -8
  73. data/app/helpers/commontator/threads_helper.rb~ +0 -22
  74. data/app/mailers/commontator/subscriptions_mailer.rb~ +0 -49
  75. data/app/models/commontator/comment.rb~ +0 -89
  76. data/app/models/commontator/comment_observer.rb~ +0 -13
  77. data/app/models/commontator/subscription.rb~ +0 -19
  78. data/app/models/commontator/thread.rb~ +0 -123
  79. data/app/views/commontator/comments/_actions.html.erb~ +0 -30
  80. data/app/views/commontator/comments/_body.html.erb~ +0 -7
  81. data/app/views/commontator/comments/_form.html.erb~ +0 -36
  82. data/app/views/commontator/comments/_show.html.erb~ +0 -44
  83. data/app/views/commontator/comments/_votes.html.erb~ +0 -57
  84. data/app/views/commontator/comments/delete.js.erb~ +0 -17
  85. data/app/views/commontator/comments/update.js.erb~ +0 -7
  86. data/app/views/commontator/shared/_thread.html.erb~ +0 -20
  87. data/app/views/commontator/shared/_thread_link.html.erb~ +0 -16
  88. data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~ +0 -6
  89. data/app/views/commontator/threads/_show.html.erb~ +0 -61
  90. data/config/initializers/commontator.rb~ +0 -164
  91. data/db/migrate/0_install_commontator.rb~ +0 -48
  92. data/lib/commontator/commontable_config.rb~ +0 -13
  93. data/lib/commontator/commontator_config.rb~ +0 -13
  94. data/lib/commontator/controller_includes.rb~ +0 -23
  95. data/lib/commontator/engine.rb~ +0 -7
  96. data/lib/commontator/shared_helper.rb~ +0 -42
  97. data/lib/commontator/shared_methods.rb~ +0 -24
  98. data/spec/app/controllers/comments_controller_spec.rb~ +0 -7
  99. data/spec/app/controllers/commontator/application_controller_spec.rb~ +0 -30
  100. data/spec/app/controllers/threads_controller_spec.rb~ +0 -12
  101. data/spec/dummy/Gemfile~ +0 -3
  102. data/spec/dummy/app/controllers/application_controller.rb~ +0 -7
  103. data/spec/dummy/app/controllers/dummies_controller.rb~ +0 -17
  104. data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -29
  105. data/spec/dummy/app/helpers/application_helper.rb~ +0 -15
  106. data/spec/dummy/app/models/dummy.rb~ +0 -3
  107. data/spec/dummy/app/models/dummy_user.rb~ +0 -9
  108. data/spec/dummy/app/models/user.rb~ +0 -5
  109. data/spec/dummy/app/views/dummy_model/show.html.erb~ +0 -1
  110. data/spec/dummy/config/application.rb~ +0 -59
  111. data/spec/dummy/config/initializers/commontator.rb~ +0 -164
  112. data/spec/dummy/config/routes.rb~ +0 -7
  113. data/spec/dummy/db/migrate/0_create_dummies.rb~ +0 -48
  114. data/spec/dummy/db/migrate/0_create_dummy_models.rb~ +0 -7
  115. data/spec/dummy/db/migrate/1_create_dummy_users.rb~ +0 -7
  116. data/spec/dummy/db/migrate/1_create_users.rb~ +0 -7
  117. data/spec/dummy/db/migrate/2_install_commontator.rb +0 -49
  118. data/spec/dummy/db/migrate/2_install_commontator.rb~ +0 -49
  119. data/spec/dummy/db/schema.rb~ +0 -71
  120. data/spec/dummy/tmp/cache/assets/CCB/1D0/sprockets%2F02d4b791eb831cf2057bf4703a1218d1 +0 -0
  121. data/spec/dummy/tmp/cache/assets/CD1/510/sprockets%2Fc69ee3cc5796188d873574179290a6ef +0 -0
  122. data/spec/dummy/tmp/cache/assets/D01/8B0/sprockets%2F0f196a1a50363b0a076ec6e1ee5417f6 +0 -0
  123. data/spec/dummy/tmp/cache/assets/D06/2F0/sprockets%2Fe1f674c11941d62aac1764ef3a7134e4 +0 -0
  124. data/spec/dummy/tmp/cache/assets/D54/060/sprockets%2Fe85565206c3e5fdf9dfeb367c85557b1 +0 -0
  125. data/spec/dummy/tmp/cache/assets/D9B/550/sprockets%2Fa41c8be5379abec3c0d0d98e2f0d5609 +0 -0
  126. data/spec/dummy/tmp/cache/assets/E01/2E0/sprockets%2Fa3fb9025f90ff05a6fd4afc7ded2692c +0 -0
@@ -1,24 +0,0 @@
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,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Commontator::CommentsController do
4
- it 'must get show' do
5
- get :show, :id => 1
6
- end
7
- end
@@ -1,30 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Commontator::ApplicationController do
4
- before do
5
-
6
- @controller = Commontator::ApplicationController.new
7
- end
8
-
9
- it 'must get user' do
10
- @controller.send :get_user
11
- @user.must_be_nil
12
-
13
- user = DummyUser.create
14
- sign_in user
15
- @controller.send :get_user
16
- @user.must_equal user
17
- @user.is_commontator.must_equal true
18
- end
19
-
20
- it 'must get thread' do
21
- @controller.send :get_thread
22
- @thread.must_be_instance_of Commontator::Thread
23
- end
24
-
25
- it 'must get commontable url' do
26
- @controller.send :get_thread
27
- @controller.send :get_commontable_url
28
- @commontable_url.must_equal 'a'
29
- end
30
- end
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Commontator::ThreadsController do
4
- it 'must get show' do
5
- thread = Commontator::Thread.new
6
- thread.commontable = thread
7
- thread.save!
8
- thread.commontable = nil
9
- thread.save!
10
- get :id => thread.id
11
- end
12
- end
data/spec/dummy/Gemfile~ DELETED
@@ -1,3 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- gem 'commontator', :path => '../..'
@@ -1,7 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery
3
-
4
- helper_method :current_user
5
-
6
- attr_accessor :current_user
7
- end
@@ -1,17 +0,0 @@
1
- class DummyController < ActionController::Base
2
- before_filter :get_dummy
3
-
4
- def hide
5
- render :show
6
- end
7
-
8
- def show
9
- commontator_thread_show(@dummy
10
- end
11
-
12
- protected
13
-
14
- def get_dummy
15
- @dummy = Dummy.find(params[:id])
16
- end
17
- end
@@ -1,29 +0,0 @@
1
- class DummyModelsController < ActionController::Base
2
- before_filter :get_dummy
3
-
4
- def hide
5
- render :show
6
- end
7
-
8
- def show
9
- commontator_thread_show(@dummy_model)
10
- end
11
-
12
- def url_options
13
- return Hash.new if request.nil?
14
- super
15
- end
16
-
17
- def view_context
18
- view_context = view_context_class.new
19
- view_context.view_paths = view_paths
20
- view_context.controller = self
21
- view_context
22
- end
23
-
24
- protected
25
-
26
- def get_dummy
27
- @dummy = DummyModel.find(params[:id])
28
- end
29
- end
@@ -1,15 +0,0 @@
1
- module ApplicationHelper
2
- @@user = User.create#nil
3
-
4
- def current_user
5
- @@user
6
- end
7
-
8
- def sign_in(user)
9
- @@user = user
10
- end
11
-
12
- def sign_out
13
- @@user = nil
14
- end
15
- end
@@ -1,3 +0,0 @@
1
- class Dummy < ActiveRecord::Base
2
- acts_as_commontable
3
- end
@@ -1,9 +0,0 @@
1
- class DummyUser < ActiveRecord::Base
2
- acts_as_commontator
3
-
4
- attr_accessor :is_admin
5
-
6
- def email
7
- 'user@example.com'
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- class User < ActiveRecord::Base
2
- acts_as_commontator
3
-
4
- attr_accessor :is_admin
5
- end
@@ -1 +0,0 @@
1
- <%= commontator_thread(@dummy) %>
@@ -1,59 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require
6
- #require "commontator"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Custom directories with classes and modules you want to be autoloadable.
15
- # config.autoload_paths += %W(#{config.root}/extras)
16
-
17
- # Only load the plugins named here, in the order given (default is alphabetical).
18
- # :all can be used as a placeholder for all plugins not explicitly named.
19
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
-
21
- # Activate observers that should always be running.
22
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
-
24
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
- # config.time_zone = 'Central Time (US & Canada)'
27
-
28
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
- # config.i18n.default_locale = :de
31
-
32
- # Configure the default encoding used in templates for Ruby 1.9.
33
- config.encoding = "utf-8"
34
-
35
- # Configure sensitive parameters which will be filtered from the log file.
36
- config.filter_parameters += [:password]
37
-
38
- # Enable escaping HTML in JSON.
39
- config.active_support.escape_html_entities_in_json = true
40
-
41
- # Use SQL instead of Active Record's schema dumper when creating the database.
42
- # This is necessary if your schema can't be completely dumped by the schema dumper,
43
- # like if you have constraints or database-specific column types
44
- # config.active_record.schema_format = :sql
45
-
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
- # Enable the asset pipeline
53
- config.assets.enabled = true
54
-
55
- # Version of your assets, change this if you want to expire all your assets
56
- config.assets.version = '1.0'
57
- end
58
- end
59
-
@@ -1,164 +0,0 @@
1
- # Change the settings below to suit your needs
2
- # All settings are initially set to their default values
3
- Commontator.configure do |config|
4
-
5
- # Engine Configuration
6
-
7
- # Name of the ApplicationController helper method that returns the current user
8
- # Default: 'current_user'
9
- config.current_user_method = 'current_user'
10
-
11
- # Proc that is called after any javascript runs (e.g. to display/clear flash messages)
12
- # It is passed the view_context object (self from the view template), so you should be able to
13
- # access anything you normally could in a view template (by using, e.g. view.flash)
14
- # However, be aware that it does not have access to the main application's helpers
15
- # Should return a string containing JS to be appended to all Commontator JS responses
16
- # Default: lambda { |view| '$("#error_explanation").remove();' }
17
- config.javascript_proc = lambda { |view| '' }
18
-
19
-
20
- # User (acts_as_commontator) Configuration
21
-
22
- # The name used if the user's name cannot be retrieved
23
- # Default: 'Anonymous'
24
- config.user_missing_name = 'Anonymous'
25
-
26
- # Whether the comment creator's name is clickable in the comment view
27
- # If enabled, the link will point to the comment creator's show page
28
- # Default: false
29
- config.user_name_clickable = false
30
-
31
- # The method that returns the user's email address
32
- # Default: 'email'
33
- config.user_email_method = 'email'
34
-
35
- # The method that returns the user's name
36
- # Default: '' (use user_missing_name)
37
- config.user_name_method = ''
38
-
39
- # Proc called with user as argument that returns true if the user is an admin
40
- # Admins can always delete other users' comments and close threads
41
- # Note: user can be nil
42
- # Default: lambda { |user| false } (no admins)
43
- config.user_admin_proc = lambda { |user| user.try(:is_admin) }
44
-
45
- # Proc called with user as argument that returns true
46
- # if the user should receive subscription emails
47
- # Default: lambda { |user| true } (always receive subscription emails)
48
- config.subscription_email_enable_proc = lambda { |user| true }
49
-
50
-
51
- # Commontable (acts_as_commontable) Configuration
52
-
53
- # What a comment is called in your application
54
- # Default: 'comment'
55
- config.comment_name = 'dummy comment'
56
-
57
- # Verb used when creating comments (present)
58
- # Default: 'post'
59
- config.comment_create_verb_present = 'post'
60
-
61
- # Verb used when creating comments (past)
62
- # Default: 'posted'
63
- config.comment_create_verb_past = 'posted'
64
-
65
- # What a commontable is called in your application
66
- # If you have multiple commontable models,
67
- # you might want to pass this configuration value
68
- # as an argument to acts_as_commontable in each one
69
- # Default: 'commontable'
70
- config.commontable_name = 'dummy model'
71
-
72
- # The format of the timestamps used by Commontator
73
- # Default: '%b %d %Y, %I:%M %p'
74
- config.timestamp_format = '%b %d %Y, %I:%M %p'
75
-
76
- # Whether admins can edit other users' comments
77
- # Default: false
78
- config.admin_can_edit_comments = false
79
-
80
- # Whether users automatically subscribe to a thread when commenting
81
- # Default: false
82
- config.auto_subscribe_on_comment = false
83
-
84
- # Whether users can edit their own comments
85
- # Default: true
86
- config.can_edit_own_comments = true
87
-
88
- # Whether users can edit their own comments
89
- # after someone posted a newer comment
90
- # Default: false
91
- config.can_edit_old_comments = false
92
-
93
- # Whether users can delete their own comments
94
- # Default: true
95
- config.can_delete_own_comments = true
96
-
97
- # Whether users can delete their own comments
98
- # after someone posted a newer comment
99
- # Default: false
100
- config.can_delete_old_comments = false
101
-
102
- # Whether users can manually subscribe or unsubscribe to threads
103
- # Default: true
104
- config.can_subscribe_to_thread = true
105
-
106
- # Whether users can vote on other users' comments
107
- # Note: requires acts_as_votable gem installed
108
- # and configured for your application
109
- # Default: false
110
- config.can_vote_on_comments = true
111
-
112
- # Whether comments should be ordered by vote score
113
- # instead of by order posted
114
- # Default: false
115
- config.comments_ordered_by_votes = false
116
-
117
- # Whether users can read threads closed by admins
118
- # Default: true
119
- config.closed_threads_are_readable = true
120
-
121
- # Whether comments deleted by admins can be seen
122
- # (the content will still be hidden)
123
- # Default: true
124
- config.deleted_comments_are_visible = true
125
-
126
- # The method which returns the commontable's id, sent to users in email messages
127
- # Default: 'id'
128
- config.commontable_id_method = 'id'
129
-
130
- # Proc called with thread and user as arguments
131
- # If it returns true, that user is a moderator for that particular thread
132
- # and is given admin-like capabilities for that thread only
133
- # Note: user can be nil
134
- # Default: lambda { |thread, user| false } (no thread-specific moderators)
135
- config.can_edit_thread_proc = lambda { |thread, user| user.try(:can_edit) }
136
-
137
- # Proc called with thread and user as arguments
138
- # If it returns true, that user is allowed to read that thread
139
- # Note: user can be nil
140
- # Default: lambda { |thread, user| true } (no read restrictions)
141
- config.can_read_thread_proc = lambda { |thread, user| user.try(:can_read) }
142
-
143
- # Proc that returns the commontable url that contains the thread
144
- # (defaults to the commontable show url)
145
- # Main application's routes can be accessed using main_app object
146
- # Default: lambda { |main_app, commontable| main_app.polymorphic_url(commontable) }
147
- config.commontable_url_proc = lambda { |main_app, commontable| main_app.polymorphic_url(commontable) }
148
-
149
- # Proc that returns the subscription email 'from' address
150
- # Default:
151
- # lambda { |params| 'no-reply@example.com' }
152
- config.subscription_email_from_proc = lambda { |params| 'no-reply@example.com' }
153
-
154
- # Proc that returns the subscription email 'subject' string
155
- # Default:
156
- # lambda do |params|
157
- # "#{params[:creator_name]} #{params[:config].comment_create_verb_past} a " + \
158
- # "#{params[:config].comment_name} on #{params[:commontable_name]} #{params[:commontable_id]}"
159
- # end
160
- config.subscription_email_subject_proc = lambda do |params|
161
- "#{params[:creator_name]} #{params[:config].comment_create_verb_past} a " + \
162
- "#{params[:config].comment_name} on #{params[:commontable_name]} #{params[:commontable_id]}"
163
- end
164
- end
@@ -1,7 +0,0 @@
1
- Dummy::Application.routes.draw do
2
- resources :dummy_models, :only => [:show] do
3
- get :hide, :on => :member
4
- end
5
-
6
- mount Commontator::Engine => "/commontator"
7
- end
@@ -1,48 +0,0 @@
1
- class CreateDummies < ActiveRecord::Migration
2
- def change
3
- create_table "dummies" do |t|
4
- t.text "body"
5
- t.integer "creator_id"
6
- t.string "creator_type"
7
- t.datetime "deleted_at"
8
- t.integer "deleter_id"
9
- t.string "deleter_type"
10
- t.integer "thread_id"
11
-
12
- t.integer "cached_votes_total", :default => 0
13
- t.integer "cached_votes_up", :default => 0
14
- t.integer "cached_votes_down", :default => 0
15
-
16
- t.timestamps
17
- end
18
-
19
- create_table "commontator_subscriptions" do |t|
20
- t.integer "subscriber_id"
21
- t.string "subscriber_type"
22
- t.integer "thread_id"
23
- t.boolean "is_unread"
24
-
25
- t.timestamps
26
- end
27
-
28
- create_table "commontator_threads" do |t|
29
- t.integer "commontable_id"
30
- t.string "commontable_type"
31
- t.datetime "closed_at"
32
- t.integer "closer_id"
33
- t.string "closer_type"
34
-
35
- t.timestamps
36
- end
37
-
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
- add_index :commontator_comments, :thread_id
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
- add_index :commontator_subscriptions, :thread_id
42
- add_index :commontator_threads, [:commontable_id, :commontable_type]
43
-
44
- add_index :commontator_comments, :cached_votes_total
45
- add_index :commontator_comments, :cached_votes_up
46
- add_index :commontator_comments, :cached_votes_down
47
- end
48
- end