Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

updated for meta_tags #278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/spree/static_content_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class StaticContentController < StoreController

def show
@page = Spree::StaticPage.finder_scope.by_store(current_store).find_by!(slug: request.path)
@static_content = @page # needed to use meta tags
end

private
Expand Down
3 changes: 3 additions & 0 deletions app/models/application_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
2 changes: 1 addition & 1 deletion app/models/spree/page.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Spree::Page < ActiveRecord::Base
class Spree::Page < ApplicationRecord
default_scope { order(position: :asc) }

has_and_belongs_to_many :stores, join_table: 'spree_pages_stores'
Expand Down