commontator 5.1.0 → 6.0.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/MIT-LICENSE +1 -1
- data/README.md +83 -63
- data/app/assets/javascripts/commontator/mentions.js +2 -2
- data/app/assets/stylesheets/commontator/application.scss +101 -0
- data/app/assets/stylesheets/commontator/comments.scss +103 -0
- data/app/controllers/commontator/application_controller.rb +21 -21
- data/app/controllers/commontator/comments_controller.rb +123 -114
- data/app/controllers/commontator/security_transgression.rb +2 -0
- data/app/controllers/commontator/subscriptions_controller.rb +20 -22
- data/app/controllers/commontator/threads_controller.rb +50 -50
- data/app/helpers/commontator/application_helper.rb +3 -5
- data/app/helpers/commontator/link_renderer.rb +25 -0
- data/app/mailers/commontator/subscriptions_mailer.rb +35 -35
- data/app/models/commontator/comment.rb +208 -91
- data/app/models/commontator/json_array_coder.rb +10 -0
- data/app/models/commontator/subscription.rb +13 -16
- data/app/models/commontator/thread.rb +139 -133
- data/app/views/commontator/comments/_actions.html.erb +9 -10
- data/app/views/commontator/comments/_body.html.erb +11 -6
- data/app/views/commontator/comments/_form.html.erb +31 -20
- data/app/views/commontator/comments/_list.html.erb +6 -5
- data/app/views/commontator/comments/_reply.html.erb +15 -0
- data/app/views/commontator/comments/_show.html.erb +31 -25
- data/app/views/commontator/comments/_votes.html.erb +12 -11
- data/app/views/commontator/comments/cancel.js.erb +6 -14
- data/app/views/commontator/comments/create.js.erb +20 -14
- data/app/views/commontator/comments/delete.js.erb +14 -14
- data/app/views/commontator/comments/edit.js.erb +6 -4
- data/app/views/commontator/comments/new.js.erb +11 -7
- data/app/views/commontator/comments/update.js.erb +6 -4
- data/app/views/commontator/comments/vote.js.erb +3 -4
- data/app/views/commontator/shared/_thread.html.erb +23 -11
- data/app/views/commontator/subscriptions/_link.html.erb +7 -8
- data/app/views/commontator/subscriptions/subscribe.js.erb +3 -4
- data/app/views/commontator/subscriptions_mailer/comment_created.html.erb +9 -8
- data/app/views/commontator/threads/_hide_show_links.js.erb +10 -9
- data/app/views/commontator/threads/_reply.html.erb +17 -16
- data/app/views/commontator/threads/_show.html.erb +75 -76
- data/app/views/commontator/threads/_show.js.erb +12 -16
- data/app/views/commontator/threads/show.js.erb +9 -6
- data/config/initializers/commontator.rb +81 -67
- data/config/locales/de.yml +28 -48
- data/config/locales/en.yml +38 -27
- data/config/locales/pt-BR.yml +31 -29
- data/config/locales/ru.yml +34 -29
- data/config/locales/zh.yml +65 -48
- data/db/migrate/0_install_commontator.rb +27 -32
- data/db/migrate/1_add_replying_to_comments.rb +9 -0
- data/lib/commontator.rb +9 -140
- data/lib/commontator/acts_as_commontable.rb +24 -33
- data/lib/commontator/acts_as_commontator.rb +28 -25
- data/lib/commontator/build_thread.rb +10 -0
- data/lib/commontator/commontable_config.rb +10 -10
- data/lib/commontator/commontator_config.rb +10 -10
- data/lib/{commontator.rb~ → commontator/config.rb} +57 -57
- data/lib/commontator/controllers.rb +35 -29
- data/lib/commontator/engine.rb +6 -4
- data/lib/commontator/shared_helper.rb +58 -21
- data/lib/commontator/version.rb +1 -3
- data/lib/tasks/commontator_tasks.rake +2 -2
- data/vendor/assets/stylesheets/mentionsInput/jquery.mentionsInput.css +0 -1
- metadata +50 -496
- data/Rakefile +0 -22
- data/app/assets/javascripts/commontator/application.js~ +0 -3
- data/app/assets/javascripts/commontator/mentions.js~ +0 -31
- data/app/assets/stylesheets/commontator/application.css +0 -5
- data/app/assets/stylesheets/commontator/application.css~ +0 -14
- data/app/assets/stylesheets/commontator/comments.css +0 -121
- data/app/assets/stylesheets/commontator/threads.css +0 -71
- data/app/assets/stylesheets/commontator/threads.css~ +0 -71
- data/app/controllers/commontator/comments_controller.rb~ +0 -160
- data/app/controllers/commontator/threads_controller.rb~ +0 -75
- data/app/mailers/commontator/subscriptions_mailer.rb~ +0 -65
- data/app/models/commontator/comment.rb~ +0 -124
- data/app/models/commontator/subscription.rb~ +0 -23
- data/app/views/commontator/shared/_thread.html.erb~ +0 -21
- data/app/views/commontator/subscriptions_mailer/comment_created.html.erb~ +0 -10
- data/app/views/commontator/threads/_hide_show.js.erb~ +0 -21
- data/app/views/commontator/threads/_hide_show_links.js.erb~ +0 -17
- data/app/views/commontator/threads/_show.html.erb~ +0 -118
- data/app/views/commontator/threads/_show.js.erb~ +0 -18
- data/config/initializers/commontator.rb~ +0 -290
- data/config/locales/en.yml~ +0 -101
- data/config/locales/ru.yml~ +0 -79
- data/config/locales/zh.yml~ +0 -79
- data/config/routes.rb~ +0 -25
- data/db/migrate/0_install_commontator.rb~ +0 -52
- data/db/migrate/1_add_parent_comment_id_to_commontator_comments.rb~ +0 -9
- data/lib/commontator/link_renderer.rb +0 -28
- data/lib/commontator/security_transgression.rb +0 -4
- data/lib/commontator/shared_helper.rb~ +0 -26
- data/lib/commontator/version.rb~ +0 -3
- data/spec/controllers/commontator/comments_controller_spec.rb +0 -613
- data/spec/controllers/commontator/comments_controller_spec.rb~ +0 -612
- data/spec/controllers/commontator/subscriptions_controller_spec.rb +0 -101
- data/spec/controllers/commontator/subscriptions_controller_spec.rb~ +0 -101
- data/spec/controllers/commontator/threads_controller_spec.rb +0 -219
- data/spec/controllers/commontator/threads_controller_spec.rb~ +0 -218
- data/spec/dummy/README.md +0 -4
- data/spec/dummy/README.md~ +0 -3
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/Rakefile~ +0 -6
- data/spec/dummy/app/assets/javascripts/application.js +0 -17
- data/spec/dummy/app/assets/javascripts/application.js~ +0 -16
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css~ +0 -14
- data/spec/dummy/app/controllers/application_controller.rb +0 -6
- data/spec/dummy/app/controllers/application_controller.rb~ +0 -4
- data/spec/dummy/app/controllers/dummy_models_controller.rb +0 -23
- data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -23
- data/spec/dummy/app/helpers/application_helper.rb +0 -16
- data/spec/dummy/app/helpers/application_helper.rb~ +0 -15
- data/spec/dummy/app/models/dummy_dependent_model.rb +0 -4
- data/spec/dummy/app/models/dummy_model.rb +0 -4
- data/spec/dummy/app/models/dummy_model.rb~ +0 -3
- data/spec/dummy/app/models/dummy_user.rb +0 -14
- data/spec/dummy/app/models/dummy_user.rb~ +0 -13
- data/spec/dummy/app/views/dummy_models/index.html.erb~ +0 -6
- data/spec/dummy/app/views/dummy_models/show.html.erb +0 -2
- data/spec/dummy/app/views/dummy_models/show.html.erb~ +0 -2
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/app/views/layouts/application.html.erb~ +0 -14
- data/spec/dummy/config.ru +0 -5
- data/spec/dummy/config.ru~ +0 -4
- data/spec/dummy/config/application.rb +0 -27
- data/spec/dummy/config/application.rb~ +0 -26
- data/spec/dummy/config/boot.rb +0 -6
- data/spec/dummy/config/boot.rb~ +0 -5
- data/spec/dummy/config/database.yml +0 -26
- data/spec/dummy/config/database.yml~ +0 -25
- data/spec/dummy/config/environment.rb +0 -8
- data/spec/dummy/config/environment.rb~ +0 -8
- data/spec/dummy/config/environments/development.rb +0 -31
- data/spec/dummy/config/environments/development.rb~ +0 -31
- data/spec/dummy/config/environments/production.rb +0 -82
- data/spec/dummy/config/environments/production.rb~ +0 -82
- data/spec/dummy/config/environments/test.rb +0 -40
- data/spec/dummy/config/environments/test.rb~ +0 -40
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -8
- data/spec/dummy/config/initializers/backtrace_silencers.rb~ +0 -7
- data/spec/dummy/config/initializers/commontator.rb +0 -20
- data/spec/dummy/config/initializers/commontator.rb~ +0 -21
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -5
- data/spec/dummy/config/initializers/filter_parameter_logging.rb~ +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -17
- data/spec/dummy/config/initializers/inflections.rb~ +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -6
- data/spec/dummy/config/initializers/mime_types.rb~ +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -13
- data/spec/dummy/config/initializers/secret_token.rb~ +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb~ +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -15
- data/spec/dummy/config/initializers/wrap_parameters.rb~ +0 -14
- data/spec/dummy/config/routes.rb +0 -9
- data/spec/dummy/config/routes.rb~ +0 -10
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/1_create_dummy_models.rb +0 -7
- data/spec/dummy/db/migrate/1_create_dummy_models.rb~ +0 -7
- data/spec/dummy/db/migrate/2_create_dummy_users.rb +0 -7
- data/spec/dummy/db/migrate/2_create_dummy_users.rb~ +0 -7
- data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb +0 -22
- data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb~ +0 -27
- data/spec/dummy/db/migrate/4_create_dummy_dependent_models.rb +0 -7
- data/spec/dummy/db/schema.rb +0 -85
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/controllers.rb~ +0 -10
- data/spec/dummy/lib/dummy_controllers.rb +0 -10
- data/spec/dummy/log/development.log +0 -6693
- data/spec/dummy/log/test.log +0 -125970
- data/spec/dummy/public/404.html +0 -27
- data/spec/dummy/public/404.html~ +0 -26
- data/spec/dummy/public/422.html +0 -27
- data/spec/dummy/public/422.html~ +0 -26
- data/spec/dummy/public/500.html +0 -26
- data/spec/dummy/public/500.html~ +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -7
- data/spec/dummy/script/rails~ +0 -6
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/-RolHYhJdGiLoPkoWZXQdI9AIWUjMMCa2yFJezCE_Bo.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/-STzK7UuGeY3gSvnmTELWLvtRMKpmSAQCEw4ao3b1r8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/3NH8nN7uktAXgA3NqaqXTXDVic3BxBvqCxoLpGGbib4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/4_iT7KM6P2IT75Rssrk9p4crTBwM8DQWR41gmsxczL0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/58TLCXvf5bFFYY-mIUXrQNOVWlGsq7qPAoSX2OIIB8Y.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6OQdyrATvNatvWu8Mp1qbuvRx-HLmzCZ5XBGYca-rZU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6UKCUV-ZLaWCoPMfMB6a2W0RCFPQzPJ6Mz-y67sH7zk.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6wKNjFdNd4OHjIpLC0nq1kBWcbYg1aEYrp7ZhWoJlvY.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/7Xxb5iYP5elo40JRlhNQB1gLbv3ueELK2rTinYt5xdc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/7twIKlS6VYCyLlwhsQg2vu4wLSUJsT2REHR4DjZf1oE.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/87m-4EcbQnkbo2HYkQp4V9I2U3AYQO1mPeReieduolA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/8B331vt8qC4iXTcVzkx3j-ET8i1oaQskj5LyqGq8mPQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/8KWvIOgvo7BVJYtdTpFuiSQQFFwZhLWYtwacZv52y48.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/9yQa5M2ObK2-qDu231zMoarjVbhKUUg-ND3r2iXqB_Q.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/A-ffuUI2juZT6qFpTUwUR1P8OPWcyFFN26WSUZe60Ko.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/BbO4diS6uacx69Hn_bCabYlXEbWWdjHShRlfzlWSOMI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/CXhqxaQQAQ8b0Y8y0jTQyiqsZ6Oe4fZn0YiacpJ9IoI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/E1zaNOh68xzPxdtdOwRtOaMCoKivN2dxVwCP65WEi5I.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/EmPkV3H8p2Snv9WyPjWran_kOMQ0MqQ1a9CVdGDd8l4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Hc12Nxe7cw2e0u2pzNsAe8D3ncQpcqLuI2NVL7aAXgw.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/HdWuQr9W2mZvggsAxVjDgLYUNfg3rbI-T8KhaDIsvQk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/I7lsrHTKpbfLWqIqdDIx2RN_12yFL2PyLRyYsMxg1IU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JOCzfBjMjX3D5BUUGh5lJ7fjzMuJrHLxAginRA2_hZQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JusxTSXt06IqBm9jeCMM2nTmM3Wvbl3i3L1IwEvW5YA.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/KAY1_IaTONtGr0KK8ihOdoA-RDXybqBMNSZLIDRHx68.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/KBHIDNfa4ryw9LAkYqK8GgPWne7HkX6mNYgrJajGm94.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/L_lv02y00MmIFiFhg5c9zhl7CDHLSahehzLyi_mRZeY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MOT2X4iikR8v89A4N1bxDTeS1-xV8c9036TNFXmwXCM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MiX2Z4Vbha1riozZWw1U3_PGttRiZ1iQ_o4wSZJnKCs.cache +0 -3
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MntKfwol0ud4LuvrX3MVPthTlfNlJZRYbQXpQBxhRrs.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MrqmgPGNYJV1capJKIKJOVEQ4NiO-Z_2YhpjNteJ8B8.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/NVMnAwylzGp5bjl_o9dwMAQxVAPDzc4ygddNQSD1fiw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/O2sKqGxNuCYhjzuEZVC9hX_FeemOfRn_1-CCuHBQYyg.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Qy3TykLFmAt5jhSluMTaZaefcA5c_vfBRhQ7tin-gsk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/R3DpUgZ_hja1dQTIzumiP9AD_r8mlOaqv0U9QqnGQqo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/RF07mgb06A30OcDWtCaDlM5tEc1yp0uAsk986Gqs5w8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/S-6Iq5YOEpVnd_vQ0RSSfrmyIwB1dk0op35alFgJ9xA.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/TKV8dUTo88gdFY-z2I7Xa5vDC1Z3LY6Paa18385MJsI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UI4zPmWfZA2d_5ZZIXqK9KmkjOKSDg6JoM7qcOIxm0Q.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UP29vrIQbCkfghZGSCFxpW5gjlsgCxlVrncjjopvRqM.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UoU16f4V7haEXM5GY5j4QFuNMP7PJZaAMEvVNNtNLBA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/VqPqYNG07yqcjbd7FA05Mu-jr5hzsZPaHFf8X0FFbXk.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/WkN1QFvcuzXSsyNmfaK02ojXPk-8zmdEegzNPfdAEL4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/WkQX7Wiz41OKx2aGF7uffOmS04hIVZeGCondBAvwum8.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/XMeYF1vwAg53eVjXVkw_IKQH2W3-9tWvtuCdqUCbPBM.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/XX0Z7OM0xZKfQaAvHARpyeQNZCstNyu9MlsnwThSkg8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Y-pGNFTA6bAKxSvqZvmMVs3b4Els1aByxZVFxtJR71c.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Y3p3m5V5NOm7yq56apKmF5KZUUsTfnhT_SG3fqbEJgo.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/YLZuRWklL6q-csC-7A7CiOTTTYEQcA9PCdWEOm9MpNU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Yo7V5YXukEBm6z37l-TIRCJx3HZExEUBu3MUMhAzkMU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/bK6QttR8pGmMAMJO0avCBLwH0za8_bAC-yWqkU3Yj24.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/cLncjrqpQXzsVBp7K0W7iG1STLrnzfGpbJXxNE7aIUk.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/dBcAd64EZFdhHZNXKGXPIR7EtPGf03bzqkci2W12T8g.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/d_bbPiareJHKkzFZFCl3pcwfQOFzsB1KHn4A2xxhR20.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/eaHZBuJRcawVlkGZVyyRr5_4xYKVOXbCqnTcmaNXzL0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gWnmfJty3jBn53qsJfOXKrWv4e8i3Dp80wVel-f1L1E.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gumo32Bd3W_q7MYEt9JIZEiQdHF93tLSsGfmXIm2MqU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/jKTlG9KP0iaCGHwg8kQ1amz9SHJ1OAWeCRRn9wc5w7c.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/kPJfTiWbmX-q6i2rjM9MAMdEf2silSihU0_lxlTGVA8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/lrt1SWPj4qWUZUMH9xg3n9KLYUqJZxRn-XI-NTU6oTI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/mcCP5u08nlCL6TgWdzzrem9uE2rbsbG3KyIXxvWvlJE.cache +0 -3
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/pC4exGjkQLXXPE0O9hjX_2AJ4DASTFeB6RGjXagxEac.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/pIRh_Lq-ZhYC_XdRcqIsCtUkTnwVET0Wrrpw1EltHd8.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/qfXc71sDbi1cE9f327D6ABPURPU6lLguGiJqH2fqM0w.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/rBcrkzXcMaiCjwvWl8tO0eARzKZS69I3i-lfsTAFzcc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/sfl8l1_1AGn-4llkmb91Q0wHJ-A-x5gAGkIUWe1zLqo.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/tFQc0MOeWpJ7t7cNP2GOzo7o9Z6YBgLEpdS0tGLvUSw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/tb9v5OemP-ADEwYnETLLi1r088kZm_TMb9ZVeTV5JxI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/uKmWfbgaNZ8FTsVK1VNuUv15rmtTHzSdJ7TQRGr0Rck.cache +0 -2
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ul0QEoovfr_12YOpyWx8BJs8fvz5Ay3AZG8-lsLr-a4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/vY6eUgBIXKHqfU2ZroS-GugKPg5_fo2QBs-vS5gBN2o.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/vrRc4DPAbHIJHJqsXfBYdyKUPFv8f8YYKJUrk-1zdVw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/wTET4PQq7wlxzrgvNivPJad-CACkoQS4BNxAP0FQaR4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/wcvE87iLx7cDjMDs_Yu1jKYvep-VyLEyj1eXL79KLp4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xQeZ92qbm2t9FaRck5xUakvNP-MJ2cs0RroN-fm0Tf8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xQz9WPf67Mu5uV4rNuOfU-y6_KWSlWcnTWrTvQPonKM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xhYTRUOS8cIvyRp2Jn6FKnXlGOSsIM2z3HAGOJoJs7w.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/yLxMFI0ARh2OKSOQLF2xEfM7sbst2vUbOBXoOuI6iTE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ynnYZxuxqerlFUytw54dl_CwP94g0U4HmGjyILWnhfQ.cache +0 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/zCivVPbSRpKF_X-P5OJeld32YhymG-bkjQwzqe2o6zg.cache +0 -2
- data/spec/dummy/tmp/cache/assets/test/sprockets/02d4b791eb831cf2057bf4703a1218d1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0f196a1a50363b0a076ec6e1ee5417f6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a3fb9025f90ff05a6fd4afc7ded2692c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c69ee3cc5796188d873574179290a6ef +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1f674c11941d62aac1764ef3a7134e4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e85565206c3e5fdf9dfeb367c85557b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/-gXoYfEJ-e9QQUbNRpNa-pwMCnTc7Eqvkq6Bosde6W8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/6iNAIrMKxHltOChiHQQf9VNsLQuj2rVKz6oqWnK7aSM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/E1zaNOh68xzPxdtdOwRtOaMCoKivN2dxVwCP65WEi5I.cache +0 -2
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/HsNbq1o4RbrEWNL4zXVqFfUVnXXLK_y0F0BvddDre6g.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/JusxTSXt06IqBm9jeCMM2nTmM3Wvbl3i3L1IwEvW5YA.cache +0 -2
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/L5DjABL_iOtoxSOLn3X7_YlxECU5EhnrVIKxJFAysgc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/PNc9TJUmRdGTSwgZvGlxKaIiJIkyoWtTPiGGWBqpHAE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/QkgTHa6nNs7XP6RPoV3yBbWWV-uo1u2-qxLuvLCFe_0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/S-6Iq5YOEpVnd_vQ0RSSfrmyIwB1dk0op35alFgJ9xA.cache +0 -2
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/Vuc93A9yywiFxc9CAdxrzdsAQw4jxiCa6JRzRjNxOYs.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/YAPBll4U0cgs6cz-WyMRKoakK_gVOOcl9n0CvGyxPjY.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/bDNeZfPBQaef5z0YajZc4jFE54nNy9gc06mPNKvvPFk.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/c5Wa2loowFYFRBaMoTn1IWYXo4BGMbEy7NIi0vbvfRU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/dkn8MYu2ve_AJW6u0jjTlKrj1KBRqorOHQR0Obx2elU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/fZuAzt_-48u9C7ZXmsPgTraGDYtNC9B9zN-9-EnxJG4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/gumo32Bd3W_q7MYEt9JIZEiQdHF93tLSsGfmXIm2MqU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ige85jXyj8X7XYr7HpA0gSTThqfPUm71HjhSJXtTbUY.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/kuYeE5bV6FdXmfB_o-xhflhSDWoQhYYaaupAXODZ9dQ.cache +0 -1
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/qhZbbNIRUaAOtGano94zLHjeBKUhKr4qbh2tTCi0Bnk.cache +0 -2
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/wJJbzdHJHP6tchng3HhfTwmjc5LursgX8yZkAjpO5UA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/xNL1WW-qU3EvV2iTSW6F4hAFRBsCYmFKJhLjgCZkOV8.cache +0 -2
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ytHkF2DwUE6oaiLyrK6tL-0INpeNhjN6ctD7J0LNY6I.cache +0 -2
- data/spec/helpers/commontator/application_helper_spec.rb +0 -10
- data/spec/helpers/commontator/application_helper_spec.rb~ +0 -9
- data/spec/lib/commontator/acts_as_commontable_spec.rb +0 -25
- data/spec/lib/commontator/acts_as_commontable_spec.rb~ +0 -25
- data/spec/lib/commontator/acts_as_commontator_spec.rb +0 -26
- data/spec/lib/commontator/acts_as_commontator_spec.rb~ +0 -52
- data/spec/lib/commontator/commontable_config_spec.rb +0 -28
- data/spec/lib/commontator/commontable_config_spec.rb~ +0 -29
- data/spec/lib/commontator/commontator_config_spec.rb +0 -28
- data/spec/lib/commontator/commontator_config_spec.rb~ +0 -29
- data/spec/lib/commontator/controller_includes_spec.rb~ +0 -18
- data/spec/lib/commontator/controllers_spec.rb +0 -18
- data/spec/lib/commontator/controllers_spec.rb~ +0 -18
- data/spec/lib/commontator/shared_helper_spec.rb +0 -21
- data/spec/lib/commontator/shared_helper_spec.rb~ +0 -22
- data/spec/lib/commontator_spec.rb +0 -25
- data/spec/lib/commontator_spec.rb~ +0 -26
- data/spec/mailers/commontator/subscriptions_mailer_spec.rb +0 -49
- data/spec/mailers/commontator/subscriptions_mailer_spec.rb~ +0 -30
- data/spec/models/commontator/comment_spec.rb +0 -82
- data/spec/models/commontator/comment_spec.rb~ +0 -82
- data/spec/models/commontator/subscription_spec.rb +0 -38
- data/spec/models/commontator/subscription_spec.rb~ +0 -38
- data/spec/models/commontator/thread_spec.rb +0 -159
- data/spec/models/commontator/thread_spec.rb~ +0 -122
- data/spec/rails_helper.rb +0 -72
- data/spec/rails_helper.rb~ +0 -74
- data/spec/spec_helper.rb +0 -94
- data/spec/spec_helper.rb~ +0 -93
- data/vendor/assets/javascripts/mentionsInput/index.js~ +0 -3
@@ -1,18 +0,0 @@
|
|
1
|
-
<% # Clients of this partial must supply the following variables:
|
2
|
-
# thread
|
3
|
-
# user
|
4
|
-
# page
|
5
|
-
# per_page
|
6
|
-
# Optionally, they can also supply the following variable:
|
7
|
-
show_all ||= false
|
8
|
-
%>
|
9
|
-
|
10
|
-
$("#thread_<%= thread.id %>_div").replaceWith(
|
11
|
-
"<%= escape_javascript(
|
12
|
-
render :partial => 'commontator/threads/show',
|
13
|
-
:formats => [:html],
|
14
|
-
:locals => { :thread => thread,
|
15
|
-
:user => user,
|
16
|
-
:page => page,
|
17
|
-
:per_page => per_page,
|
18
|
-
:show_all => show_all }) %>");
|
@@ -1,290 +0,0 @@
|
|
1
|
-
# Change the settings below to suit your needs
|
2
|
-
# All settings are initially set to their default values
|
3
|
-
|
4
|
-
# Note: Do not "return" from a Proc, use "next" instead if necessary
|
5
|
-
# "return" in a lambda is OK
|
6
|
-
Commontator.configure do |config|
|
7
|
-
# Engine Configuration
|
8
|
-
|
9
|
-
# current_user_proc
|
10
|
-
# Type: Proc
|
11
|
-
# Arguments: the current controller (ActionController::Base)
|
12
|
-
# Returns: the current user (acts_as_commontator)
|
13
|
-
# The default works for Devise and similar authentication plugins
|
14
|
-
# Default: lambda { |controller| controller.current_user }
|
15
|
-
config.current_user_proc = lambda { |controller| controller.current_user }
|
16
|
-
|
17
|
-
# javascript_proc
|
18
|
-
# Type: Proc
|
19
|
-
# Arguments: a view (ActionView::Base)
|
20
|
-
# Returns: a String that is appended to Commontator JS views
|
21
|
-
# Can be used, for example, to display/clear Rails error messages
|
22
|
-
# or to reapply JQuery UI styles after Ajax calls
|
23
|
-
# Objects visible in view templates can be accessed
|
24
|
-
# through the view object (for example, view.flash)
|
25
|
-
# However, the view does not include the main application's helpers
|
26
|
-
# Default: lambda { |view| '$("#error_explanation").remove();' }
|
27
|
-
config.javascript_proc = lambda { |view|
|
28
|
-
'$("#error_explanation").remove();' }
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
# User (acts_as_commontator) Configuration
|
33
|
-
|
34
|
-
# user_name_proc
|
35
|
-
# Type: Proc
|
36
|
-
# Arguments: a user (acts_as_commontator)
|
37
|
-
# Returns: the user's name (String)
|
38
|
-
# Default: lambda { |user| I18n.t('commontator.anonymous') } (all users are anonymous)
|
39
|
-
config.user_name_proc = lambda { |user| I18n.t('commontator.anonymous') }
|
40
|
-
|
41
|
-
# user_link_proc
|
42
|
-
# Type: Proc
|
43
|
-
# Arguments: a user (acts_as_commontator),
|
44
|
-
# the app_routes (ActionDispatch::Routing::RoutesProxy)
|
45
|
-
# Returns: a path to the user's `show` page (String)
|
46
|
-
# If anything non-blank is returned, the user's name in comments
|
47
|
-
# comments will become a hyperlink pointing to this path
|
48
|
-
# The main application's routes can be accessed through the app_routes object
|
49
|
-
# Default: lambda { |user, app_routes| '' } (no link)
|
50
|
-
config.user_link_proc = lambda { |user, app_routes| '' }
|
51
|
-
|
52
|
-
# user_avatar_proc
|
53
|
-
# Type: Proc
|
54
|
-
# Arguments: a user (acts_as_commontator), a view (ActionView::Base)
|
55
|
-
# Returns: a String containing a HTML <img> tag pointing to the user's avatar image
|
56
|
-
# The commontator_gravatar_image_tag helper takes a user object,
|
57
|
-
# a border size and an options hash for Gravatar, and produces a Gravatar image tag
|
58
|
-
# See available options at http://en.gravatar.com/site/implement/images/)
|
59
|
-
# Note: Gravatar has several security implications for your users
|
60
|
-
# It makes your users trackable across different sites and
|
61
|
-
# allows de-anonymization attacks against their email addresses
|
62
|
-
# If you absolutely want to keep users' email addresses or identities secret,
|
63
|
-
# do not use Gravatar or similar services
|
64
|
-
# Default: lambda { |user, view|
|
65
|
-
# view.commontator_gravatar_image_tag(
|
66
|
-
# user, 1, :s => 60, :d => 'mm') }
|
67
|
-
config.user_avatar_proc = lambda { |user, view|
|
68
|
-
view.commontator_gravatar_image_tag(
|
69
|
-
user, 1, :s => 60, :d => 'mm') }
|
70
|
-
|
71
|
-
# user_email_proc
|
72
|
-
# Type: Proc
|
73
|
-
# Arguments: a user (acts_as_commontator), a mailer (ActionMailer::Base)
|
74
|
-
# Returns: the user's email address (String)
|
75
|
-
# The default works for Devise's defaults
|
76
|
-
# If the mailer argument is nil, Commontator intends to hash the email and send the hash
|
77
|
-
# to Gravatar, so you should always return the user's email address (if using Gravatar)
|
78
|
-
# If the mailer argument is not nil, then Commontator intends to send an email to
|
79
|
-
# the address returned; you can prevent it from being sent by returning a blank String
|
80
|
-
# Default: lambda { |user, mailer| user.try(:email) || '' }
|
81
|
-
config.user_email_proc = lambda { |user, mailer| user.try(:email) || '' }
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
# Thread/Commontable (acts_as_commontable) Configuration
|
86
|
-
|
87
|
-
# comment_filter
|
88
|
-
# Type: Arel node (Arel::Nodes::Node) or nil
|
89
|
-
# Arel that filters visible comments
|
90
|
-
# If specified, visible comments will be filtered according to this Arel node
|
91
|
-
# A value of nil will cause no filtering to be done
|
92
|
-
# Moderators can manually override this filter for themselves
|
93
|
-
# Example: Commontator::Comment.arel_table[:deleted_at].eq(nil) (hides deleted comments)
|
94
|
-
# This is not recommended, as it can cause confusion over deleted comments
|
95
|
-
# If using pagination, it can also cause comments to change pages
|
96
|
-
# Default: nil (no filtering - all comments are visible)
|
97
|
-
config.comment_filter = nil
|
98
|
-
|
99
|
-
# thread_read_proc
|
100
|
-
# Type: Proc
|
101
|
-
# Arguments: a thread (Commontator::Thread), a user (acts_as_commontator)
|
102
|
-
# Returns: a Boolean, true iif the user should be allowed to read that thread
|
103
|
-
# Note: can be called with a user object that is nil (if they are not logged in)
|
104
|
-
# Default: lambda { |thread, user| true } (anyone can read any thread)
|
105
|
-
config.thread_read_proc = lambda { |thread, user| true }
|
106
|
-
|
107
|
-
# thread_moderator_proc
|
108
|
-
# Type: Proc
|
109
|
-
# Arguments: a thread (Commontator::Thread), a user (acts_as_commontator)
|
110
|
-
# Returns: a Boolean, true iif the user is a moderator for that thread
|
111
|
-
# If you want global moderators, make this proc true for them regardless of thread
|
112
|
-
# Default: lambda { |thread, user| false } (no moderators)
|
113
|
-
config.thread_moderator_proc = lambda { |thread, user| false }
|
114
|
-
|
115
|
-
# comment_editing
|
116
|
-
# Type: Symbol
|
117
|
-
# Whether users can edit their own comments
|
118
|
-
# Valid options:
|
119
|
-
# :a (always)
|
120
|
-
# :l (only if it's the latest comment)
|
121
|
-
# :n (never)
|
122
|
-
# Default: :l
|
123
|
-
config.comment_editing = :l
|
124
|
-
|
125
|
-
# comment_deletion
|
126
|
-
# Type: Symbol
|
127
|
-
# Whether users can delete their own comments
|
128
|
-
# Valid options:
|
129
|
-
# :a (always)
|
130
|
-
# :l (only if it's the latest comment)
|
131
|
-
# :n (never)
|
132
|
-
# Note: For moderators, see the next option
|
133
|
-
# Default: :l
|
134
|
-
config.comment_deletion = :l
|
135
|
-
|
136
|
-
# moderator_permissions
|
137
|
-
# Type: Symbol
|
138
|
-
# What permissions moderators have
|
139
|
-
# Valid options:
|
140
|
-
# :e (delete and edit comments and close threads)
|
141
|
-
# :d (delete comments and close threads)
|
142
|
-
# :c (close threads only)
|
143
|
-
# Default: :d
|
144
|
-
config.moderator_permissions = :d
|
145
|
-
|
146
|
-
# comment_voting
|
147
|
-
# Type: Symbol
|
148
|
-
# Whether users can vote on other users' comments
|
149
|
-
# Valid options:
|
150
|
-
# :n (no voting)
|
151
|
-
# :l (likes - requires acts_as_votable gem)
|
152
|
-
# :ld (likes/dislikes - requires acts_as_votable gem)
|
153
|
-
# Not yet implemented:
|
154
|
-
# :s (star ratings)
|
155
|
-
# :r (reputation system)
|
156
|
-
# Default: :n
|
157
|
-
config.comment_voting = :n
|
158
|
-
|
159
|
-
# vote_count_proc
|
160
|
-
# Type: Proc
|
161
|
-
# Arguments: a thread (Commontator::Thread), pos (Fixnum), neg (Fixnum)
|
162
|
-
# Returns: vote count to be displayed (String)
|
163
|
-
# pos is the number of likes, or the rating, or the reputation
|
164
|
-
# neg is the number of dislikes, if applicable, or 0 otherwise
|
165
|
-
# Default: lambda { |thread, pos, neg| "%+d" % (pos - neg) }
|
166
|
-
config.vote_count_proc = lambda { |thread, pos, neg| "%+d" % (pos - neg) }
|
167
|
-
|
168
|
-
# comment_order
|
169
|
-
# Type: Symbol
|
170
|
-
# What order to use for comments
|
171
|
-
# Valid options:
|
172
|
-
# :e (earliest comment first)
|
173
|
-
# :l (latest comment first)
|
174
|
-
# :ve (highest voted first; earliest first if tied)
|
175
|
-
# :vl (highest voted first; latest first if tied)
|
176
|
-
# Notes:
|
177
|
-
# :e is usually used in forums (discussions)
|
178
|
-
# :l is usually used in blogs (opinions)
|
179
|
-
# :ve and :vl are usually used where it makes sense to rate comments
|
180
|
-
# based on usefulness (q&a, reviews, guides, etc.)
|
181
|
-
# If :l is selected, the "reply to thread" form will appear before the comments
|
182
|
-
# Otherwise, it will appear after the comments
|
183
|
-
# Default: :e
|
184
|
-
config.comment_order = :e
|
185
|
-
|
186
|
-
# new_comment_style
|
187
|
-
# Type: Symbol
|
188
|
-
# How to display the "new comment" form
|
189
|
-
# Valid options:
|
190
|
-
# :t (always present in the thread's page)
|
191
|
-
# :l (link to the form; opens in the same page using JS)
|
192
|
-
# Not yet implemented:
|
193
|
-
# :n (link to the form; opens in a new window)
|
194
|
-
# Default: :l
|
195
|
-
config.new_comment_style = :l
|
196
|
-
|
197
|
-
# comments_per_page
|
198
|
-
# Type: Fixnum or nil
|
199
|
-
# Number of comments to display in each page
|
200
|
-
# Set to nil to disable pagination
|
201
|
-
# Any other value requires the will_paginate gem
|
202
|
-
# Default: nil (no pagination)
|
203
|
-
config.comments_per_page = nil
|
204
|
-
|
205
|
-
# thread_subscription
|
206
|
-
# Type: Symbol
|
207
|
-
# Whether users can subscribe to threads to receive activity email notifications
|
208
|
-
# Valid options:
|
209
|
-
# :n (no subscriptions)
|
210
|
-
# :a (automatically subscribe when you comment; cannot do it manually)
|
211
|
-
# :m (manual subscriptions only)
|
212
|
-
# :b (both automatic, when commenting, and manual)
|
213
|
-
# Default: :n
|
214
|
-
config.thread_subscription = :n
|
215
|
-
|
216
|
-
# email_from_proc
|
217
|
-
# Type: Proc
|
218
|
-
# Arguments: a thread (Commontator::Thread)
|
219
|
-
# Returns: the address emails are sent "from" (String)
|
220
|
-
# Important: If using subscriptions, change this to at least match your domain name
|
221
|
-
# Default: lambda { |thread|
|
222
|
-
# "no-reply@#{Rails.application.class.parent.to_s.downcase}.com" }
|
223
|
-
config.email_from_proc = lambda { |thread|
|
224
|
-
"no-reply@#{Rails.application.class.parent.to_s.downcase}.com" }
|
225
|
-
|
226
|
-
# commontable_name_proc
|
227
|
-
# Type: Proc
|
228
|
-
# Arguments: a thread (Commontator::Thread)
|
229
|
-
# Returns: a name that refers to the commontable object (String)
|
230
|
-
# If you have multiple commontable models, you can also pass this
|
231
|
-
# configuration value as an argument to acts_as_commontable for each one
|
232
|
-
# Default: lambda { |thread|
|
233
|
-
# "#{thread.commontable.class.name} ##{thread.commontable.id}" }
|
234
|
-
config.commontable_name_proc = lambda { |thread|
|
235
|
-
"#{thread.commontable.class.name} ##{thread.commontable.id}" }
|
236
|
-
|
237
|
-
# comment_url_proc
|
238
|
-
# Type: Proc
|
239
|
-
# Arguments: a comment (Commontator::Comment),
|
240
|
-
# the app_routes (ActionDispatch::Routing::RoutesProxy)
|
241
|
-
# Returns: a String containing the url of the view that displays the given comment
|
242
|
-
# This usually is the commontable's "show" page
|
243
|
-
# The main application's routes can be accessed through the app_routes object
|
244
|
-
# Default: lambda { |comment, app_routes|
|
245
|
-
<<<<<<< Updated upstream
|
246
|
-
# app_routes.polymorphic_url(comment.thread.commontable) }
|
247
|
-
# Link to comment:
|
248
|
-
# lambda { |comment, app_routes|
|
249
|
-
# app_routes.polymorphic_url(comment.thread.commontable, anchor: "comment_#{comment.id}_div") }
|
250
|
-
# (defaults to the commontable's show url)
|
251
|
-
config.commontable_url_proc = lambda { |comment, app_routes|
|
252
|
-
app_routes.polymorphic_url(comment.thread.commontable) }
|
253
|
-
=======
|
254
|
-
# app_routes.polymorphic_url(comment.thread.commontable,
|
255
|
-
# anchor: "comment_#{comment.id}_div") }
|
256
|
-
# (defaults to the commontable's show url with an anchor pointing to the comment's div)
|
257
|
-
config.comment_url_proc = lambda { |comment, app_routes|
|
258
|
-
app_routes.polymorphic_url(comment.thread.commontable, anchor: "comment_#{comment.id}_div") }
|
259
|
-
>>>>>>> Stashed changes
|
260
|
-
|
261
|
-
# mentions_enabled
|
262
|
-
# Type: Boolean
|
263
|
-
# Whether users can mention other users to subscribe them to the thread
|
264
|
-
# Valid options:
|
265
|
-
# false (no mentions)
|
266
|
-
# true (mentions enabled)
|
267
|
-
# Default: false
|
268
|
-
config.mentions_enabled = false
|
269
|
-
|
270
|
-
# user_mentions_proc
|
271
|
-
# Type: Proc
|
272
|
-
# Arguments:
|
273
|
-
# the current user (acts_as_commontator)
|
274
|
-
# the search query inputted by user (String)
|
275
|
-
# Returns: an ActiveRecord Relation object
|
276
|
-
# Important notes:
|
277
|
-
#
|
278
|
-
# - The proc will be called internally with an empty search string.
|
279
|
-
# In that case, it MUST return all users that can be mentioned.
|
280
|
-
#
|
281
|
-
# - With mentions enabled, any registered user in your app is able
|
282
|
-
# to call this proc with any search query >= 3 characters.
|
283
|
-
# Make sure to handle SQL escaping properly and that the
|
284
|
-
# attribute being searched does not contain sensitive information.
|
285
|
-
#
|
286
|
-
# Default: lambda { |current_user, query|
|
287
|
-
# current_user.class.where('username LIKE ?', "#{query}%") }
|
288
|
-
config.user_mentions_proc = lambda { |current_user, query|
|
289
|
-
current_user.class.where('username LIKE ?', "#{query}%") }
|
290
|
-
end
|
data/config/locales/en.yml~
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
---
|
23
|
-
en:
|
24
|
-
activerecord:
|
25
|
-
attributes:
|
26
|
-
commontator/comment:
|
27
|
-
body: Comment
|
28
|
-
creator: Creator
|
29
|
-
editor: Editor
|
30
|
-
thread: Discussion
|
31
|
-
commontator/subscription:
|
32
|
-
subscriber: Subscriber
|
33
|
-
thread: Discussion
|
34
|
-
commontator/thread:
|
35
|
-
commontable: Commontable
|
36
|
-
models:
|
37
|
-
commontator/comment:
|
38
|
-
one: comment
|
39
|
-
other: comments
|
40
|
-
commontator/subscription:
|
41
|
-
one: subscription
|
42
|
-
other: subscriptions
|
43
|
-
commontator/thread:
|
44
|
-
one: thread
|
45
|
-
other: threads
|
46
|
-
commontator:
|
47
|
-
anonymous: Anonymous
|
48
|
-
comment:
|
49
|
-
actions:
|
50
|
-
cancel: Cancel
|
51
|
-
confirm_delete: "Are you sure you want to delete this comment?"
|
52
|
-
create: "Post Comment"
|
53
|
-
delete: Delete
|
54
|
-
edit: Edit
|
55
|
-
new: "New Comment"
|
56
|
-
undelete: Undelete
|
57
|
-
update: "Modify Comment"
|
58
|
-
errors:
|
59
|
-
already_deleted: "This comment has already been deleted."
|
60
|
-
create: "This comment could not be posted because:"
|
61
|
-
double_posted: "is a duplicate of another comment."
|
62
|
-
not_deleted: "This comment is not deleted."
|
63
|
-
update: "This comment could not be modified because:"
|
64
|
-
status:
|
65
|
-
created_at: "Posted on %{created_at}."
|
66
|
-
deleted_by: "Comment deleted by %{deleter_name}."
|
67
|
-
updated_at: "Last modified by %{editor_name} on %{updated_at}."
|
68
|
-
email:
|
69
|
-
comment_created:
|
70
|
-
body: "%{creator_name} commented on %{commontable_name}:"
|
71
|
-
subject: "%{creator_name} posted a comment on %{commontable_name}"
|
72
|
-
thread_link_html: "<a href=\"%{comment_url}\">Click here</a> to view all comments on %{commontable_name}."
|
73
|
-
undisclosed_recipients: "Undisclosed Recipients"
|
74
|
-
require_login: "You must login before you can post a comment."
|
75
|
-
subscription:
|
76
|
-
actions:
|
77
|
-
confirm_unsubscribe: "Are you sure you want to unsubscribe from this discussion?"
|
78
|
-
subscribe: Subscribe
|
79
|
-
unsubscribe: Unsubscribe
|
80
|
-
errors:
|
81
|
-
already_subscribed: "You are already subscribed to this discussion."
|
82
|
-
not_subscribed: "You are not subscribed to this discussion."
|
83
|
-
thread:
|
84
|
-
actions:
|
85
|
-
show_all: "Show All Comments"
|
86
|
-
filter: "Filter Comments"
|
87
|
-
close: "Close Discussion"
|
88
|
-
confirm_close: "Are you sure you want to close this discussion?"
|
89
|
-
reopen: "Reopen Discussion"
|
90
|
-
show: "Show Comments"
|
91
|
-
hide: "Hide Comments"
|
92
|
-
errors:
|
93
|
-
already_closed: "This discussion has already been closed."
|
94
|
-
not_closed: "This discussion is not closed."
|
95
|
-
status:
|
96
|
-
cannot_post: "New comments cannot be posted at this time."
|
97
|
-
closed: "Comments (Closed by %{closer_name})"
|
98
|
-
open: Comments
|
99
|
-
time:
|
100
|
-
formats:
|
101
|
-
commontator: "%b %d %Y at %I:%M%p %Z"
|
data/config/locales/ru.yml~
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
ru:
|
2
|
-
activerecord:
|
3
|
-
attributes:
|
4
|
-
commontator/comment:
|
5
|
-
body: Комментарий
|
6
|
-
creator: Создал
|
7
|
-
editor: Редактировал
|
8
|
-
thread: Обсуждение
|
9
|
-
commontator/subscription:
|
10
|
-
subscriber: Подписчик
|
11
|
-
thread: Обсуждение
|
12
|
-
commontator/thread:
|
13
|
-
commontable: Комментируем
|
14
|
-
models:
|
15
|
-
commontator/comment:
|
16
|
-
one: комментарий
|
17
|
-
other: комментарии
|
18
|
-
commontator/subscription:
|
19
|
-
one: подписка
|
20
|
-
other: подписки
|
21
|
-
commontator/thread:
|
22
|
-
one: обсуждение
|
23
|
-
other: обсуждения
|
24
|
-
commontator:
|
25
|
-
anonymous: Аноним
|
26
|
-
comment:
|
27
|
-
actions:
|
28
|
-
cancel: Отменить
|
29
|
-
confirm_delete: "Вы уверены, что хотите удалить комментарий?"
|
30
|
-
create: "Оставить Комментарий"
|
31
|
-
delete: Удалить
|
32
|
-
edit: Редактировать
|
33
|
-
new: "Новый Комментарий"
|
34
|
-
undelete: Восстановить
|
35
|
-
update: "Изменить Комментарий"
|
36
|
-
errors:
|
37
|
-
already_deleted: "Этот комментарий был удален."
|
38
|
-
create: "Комментарий нельзя оставить потому что"
|
39
|
-
double_posted: "этот комментарий уже есть."
|
40
|
-
not_deleted: "Этот комментарий не удален."
|
41
|
-
update: "Этот комментарий нельзя изменить потому что"
|
42
|
-
status:
|
43
|
-
created_at: "Создан %{created_at}."
|
44
|
-
deleted_by: "Комментарий был удален %{deleter_name}."
|
45
|
-
updated_at: "Редактировал %{editor_name}, %{updated_at}."
|
46
|
-
email:
|
47
|
-
comment_created:
|
48
|
-
body: "%{creator_name} комментировал %{commontable_name}:"
|
49
|
-
subject: "%{creator_name} оставил комментарий к %{commontable_name}"
|
50
|
-
thread_link_html: "<a href=\"%{comment_url}\">Нажмите здесь</a> чтобы посмотреть все комментарии к %{commontable_name}."
|
51
|
-
undisclosed_recipients: "Не указан получатель"
|
52
|
-
require_login: "Вы должны залогиниться прежде чем оставить комментарий."
|
53
|
-
subscription:
|
54
|
-
actions:
|
55
|
-
confirm_unsubscribe: "Вы уверены, что хотите отписать от обсуждения?"
|
56
|
-
subscribe: Подписаться
|
57
|
-
unsubscribe: Отписаться
|
58
|
-
errors:
|
59
|
-
already_subscribed: "Вы уже подписаны на это обсуждение."
|
60
|
-
not_subscribed: "Вы не подписаны на это обсуждение."
|
61
|
-
thread:
|
62
|
-
actions:
|
63
|
-
show_all: "Показать все комментарии"
|
64
|
-
filter: "Фильтровать комментарии"
|
65
|
-
close: "Закрыть обсуждение"
|
66
|
-
confirm_close: "Вы уверены, что хотите закрыть обсуждение?"
|
67
|
-
reopen: "Открыть заново обсуждение"
|
68
|
-
show: "Показать комментарии"
|
69
|
-
hide: "скрыть комментарии"
|
70
|
-
errors:
|
71
|
-
already_closed: "Это обсуждение было закрыто."
|
72
|
-
not_closed: "Это обсуждение не закрыто."
|
73
|
-
status:
|
74
|
-
cannot_post: "Новый комментарии нельзя разместить в данный момент."
|
75
|
-
closed: "Комментарии (Закрыты %{closer_name})"
|
76
|
-
open: Комментарии
|
77
|
-
time:
|
78
|
-
formats:
|
79
|
-
commontator: "%b %d %Y в %I:%M%p %Z"
|