FEATURE: Rake themes installer (#7848)

* Delete remote_theme when deleting the theme

* Install themes and theme components through rake

* Removed unnecessary test
This commit is contained in:
Ralph Rooding
2019-07-04 14:33:05 -04:00
committed by Robin Ward
parent 72bac61c90
commit 1318e0b288
4 changed files with 181 additions and 1 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ class Theme < ActiveRecord::Base
has_many :child_themes, -> { order(:name) }, through: :child_theme_relation, source: :child_theme
has_many :parent_themes, -> { order(:name) }, through: :parent_theme_relation, source: :parent_theme
has_many :color_schemes
belongs_to :remote_theme, autosave: true
belongs_to :remote_theme, autosave: true, dependent: :destroy
has_one :settings_field, -> { where(target_id: Theme.targets[:settings], name: "yaml") }, class_name: 'ThemeField'
has_one :javascript_cache, dependent: :destroy