Georg Keferböck
02/09/2023, 11:00 PMJared Norman
Jared Norman
Spree::StoreController
for them as well.Georg Keferböck
02/10/2023, 8:56 PMGeorg Keferböck
02/14/2023, 6:33 PMGeorg Keferböck
02/14/2023, 6:33 PMSpree::Core::Engine.routes.prepend do
match 'cookie-policy', to: 'legal_pages#cookie_policy', via: :get
match 'privacy-policy', to: 'legal_pages#privacy_policy', via: :get
match 'terms-and-conditions', to: 'legal_pages#terms_and_conditions', as: 'terms_and_conditions', via: :get
match 'shipping-policy', to: 'legal_pages#shipping_policy', as: 'shipping_policy', via: :get
match 'contact-us', to: 'static_pages#about_us', as: 'about_us', via: :get
match 'faqs', to: 'static_pages#faqs', as: 'faqs', via: :get
end
Georg Keferböck
02/14/2023, 6:33 PMGeorg Keferböck
02/14/2023, 6:33 PMclass Spree::LegalPagesController < Spree::StoreController
def cookie_policy
end
def privacy_policy
end
def shipping_policy
end
def terms_and_conditions
end
end
Georg Keferböck
02/14/2023, 6:33 PMGeorg Keferböck
02/14/2023, 6:34 PMJared Norman
match
, you can just use the get
helper, get "cookie-policy", to: "legal_pages#cookie_policy"
etc.Jared Norman
config/routes.rb
?Georg Keferböck
02/14/2023, 6:38 PMJared Norman
Jared Norman
rails routes
Georg Keferböck
02/14/2023, 7:06 PMGeorg Keferböck
02/14/2023, 10:41 PMGeorg Keferböck
02/14/2023, 10:41 PMGeorg Keferböck
02/14/2023, 10:41 PMRails.application.routes.draw do
Spree::Core::Engine.routes.prepend do
get 'cookie-policy', to: 'legal_pages#cookie_policy'
get 'privacy-policy', to: 'legal_pages#privacy_policy'
get 'terms-and-conditions', to: 'legal_pages#terms_and_conditions', as: 'terms_and_conditions'
get 'shipping-policy', to: 'legal_pages#shipping_policy', as: 'shipping_policy'
get 'contact-us', to: 'static_pages#about_us', as: 'about_us'
get 'faqs', to: 'static_pages#faqs', as: 'faqs'
end
# This line mounts Solidus's routes at the root of your application.
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
# If you would like to change where this engine is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
mount Spree::Core::Engine, at: '/'
# For details on the DSL available within this file, see <https://guides.rubyonrails.org/routing.html>
end
Georg Keferböck
02/14/2023, 10:41 PMGeorg Keferböck
02/14/2023, 10:41 PMGeorg Keferböck
02/14/2023, 10:42 PMGeorg Keferböck
02/14/2023, 10:42 PMGeorg Keferböck
02/14/2023, 10:42 PMGeorg Keferböck
02/14/2023, 10:42 PMGeorg Keferböck
02/14/2023, 10:42 PMGeorg Keferböck
02/14/2023, 10:43 PMJared Norman
Rails.application.routes.draw
block:Jared Norman
Georg Keferböck
02/16/2023, 11:34 AMGeorg Keferböck
02/16/2023, 11:34 AMGeorg Keferböck
02/16/2023, 11:35 AMGeorg Keferböck
02/16/2023, 11:35 AMSpree::Core::Engine.routes.append do
get 'cookie-policy', to: 'legal_pages#cookie_policy'
get 'privacy-policy', to: 'legal_pages#privacy_policy'
get 'terms-and-conditions', to: 'legal_pages#terms_and_conditions'
get 'shipping-policy', to: 'legal_pages#shipping_policy'
get 'contact-us', to: 'static_pages#about_us'
get 'faqs', to: 'static_pages#faqs'
end
Georg Keferböck
02/16/2023, 11:35 AMGeorg Keferböck
02/16/2023, 11:35 AMGeorg Keferböck
02/16/2023, 11:37 AMGeorg Keferböck
02/16/2023, 11:38 AM