Class: StaticContentController

Inherits:
StoreController
  • Object
show all
Defined in:
lib/generators/solidus_static_content/install/templates/app/controllers/static_content_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
10
11
12
13
# File 'lib/generators/solidus_static_content/install/templates/app/controllers/static_content_controller.rb', line 7

def show
  @page = Spree::Page.by_store(current_store).visible.find_by!(slug: request.path_info)

  # Assign static_content to let solidus recognize it as the current
  # controller resource, this is used by meta tags and in other places.
  @static_content = @page
end