Class: Admin::ThemesController
- Inherits:
-
Spree::Admin::BaseController
- Object
- Spree::Admin::BaseController
- Admin::ThemesController
- Defined in:
- app/controllers/admin/themes_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Selected Theme name is written into sandbox/config/*.yml file.
-
#new ⇒ Object
To select your theme.
Instance Method Details
#create ⇒ Object
Selected Theme name is written into sandbox/config/*.yml file
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/admin/themes_controller.rb', line 9 def create system "echo theme: \\'#{params[:option]}\\' > #{Rails.root}/config/multi_theme_settings.yml" if Rails.env == "production" system "touch #{Rails.root}/tmp/restart.txt" flash[:notice] = "Store Panel layout is Changed as #{params[:option]}" else load File.("../../../../config/initializers/load_config.rb", __FILE__) flash[:notice] = "Store Panel layout is Changed as #{params[:option]} Please restart your server" end redirect_to "/admin/themes/new" end |
#new ⇒ Object
To select your theme
4 5 6 |
# File 'app/controllers/admin/themes_controller.rb', line 4 def new @options=THEME_OPTIONS["options"].split(' ') end |