mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:21:12 +08:00
REFACTOR: rename "total_votes" poll field to the more accurate "voters"
FEATURE: automagically load plugin's migrations
This commit is contained in:
@ -217,9 +217,6 @@ class Plugin::Instance
|
||||
DiscoursePluginRegistry.register_glob(root_path, 'hbs')
|
||||
end
|
||||
|
||||
# Automatically include all rake tasks
|
||||
Rake.add_rakelib "#{File.dirname(path)}/lib/tasks"
|
||||
|
||||
self.instance_eval File.read(path), path
|
||||
if auto_assets = generate_automatic_assets!
|
||||
assets.concat auto_assets.map{|a| [a]}
|
||||
@ -227,10 +224,18 @@ class Plugin::Instance
|
||||
|
||||
register_assets! unless assets.blank?
|
||||
|
||||
# TODO possibly amend this to a rails engine
|
||||
# TODO: possibly amend this to a rails engine
|
||||
|
||||
# Automatically include assets
|
||||
Rails.configuration.assets.paths << auto_generated_path
|
||||
Rails.configuration.assets.paths << File.dirname(path) + "/assets"
|
||||
|
||||
# Automatically include rake tasks
|
||||
Rake.add_rakelib(File.dirname(path) + "/lib/tasks")
|
||||
|
||||
# Automatically include migrations
|
||||
Rails.configuration.paths["db/migrate"] << File.dirname(path) + "/db/migrate"
|
||||
|
||||
public_data = File.dirname(path) + "/public"
|
||||
if Dir.exists?(public_data)
|
||||
target = Rails.root.to_s + "/public/plugins/"
|
||||
|
Reference in New Issue
Block a user