Class: Spree::Admin::StorefrontController

Inherits:
BaseController
  • Object
show all
Includes:
StorefrontBreadcrumbConcern
Defined in:
app/controllers/spree/admin/storefront_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



7
8
9
# File 'app/controllers/spree/admin/storefront_controller.rb', line 7

def edit
  @store = current_store
end

#updateObject



11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/spree/admin/storefront_controller.rb', line 11

def update
  @store = current_store
  if @store.update(store_params)
    remove_assets(%w[favicon_image social_image], object: @store)
    flash[:success] = flash_message_for(@store, :successfully_updated)
  else
    flash[:error] = @store.errors.full_messages.to_sentence
  end

  redirect_to spree.edit_admin_storefront_path
end