PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/plugin.rb

https://bitbucket.org/amazingacademy/community-voting-plugin
Ruby | 27 lines | 15 code | 7 blank | 5 comment | 0 complexity | c3cbeb3679b689065f6d8d905befb5da MD5 | raw file
  1. # name: voting
  2. # about: Adds up/down voting to Discourse
  3. # version: 1.0.7
  4. # authors: Gustavo Scanferla, Carlos Urango
  5. # url: https://bitbucket.org/amazingacademy/community-voting-plugin
  6. gem 'activerecord-reputation-system', '3.0.1'
  7. register_asset "javascripts/main.js"
  8. register_asset "stylesheets/voting.scss"
  9. register_asset "javascripts/discourse/templates/list/topic-list-item.raw.hbs"
  10. register_asset "javascripts/discourse/templates/user/user.hbs"
  11. Rails.configuration.assets.precompile += ['voting.css']
  12. after_initialize do
  13. load File.expand_path("../app/models/topic.rb", __FILE__)
  14. load File.expand_path("../app/models/post.rb", __FILE__)
  15. load File.expand_path("../app/models/top_topic.rb", __FILE__)
  16. load File.expand_path("../app/serializers/topic_list_item_serializer.rb", __FILE__)
  17. load File.expand_path("../app/serializers/user_serializer.rb", __FILE__)
  18. load File.expand_path("../app/controllers/voting_controller.rb", __FILE__)
  19. load File.expand_path("../config/routes.rb", __FILE__)
  20. end