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

Commit

Permalink
updated for meta_tags
Browse files Browse the repository at this point in the history
  • Loading branch information
vovuk097 committed Nov 11, 2020
1 parent 4956557 commit 25f0cbb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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/spree/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

0 comments on commit 25f0cbb

Please sign in to comment.