Class: Spree::PoliciesController
- Inherits:
-
StoreController
- Object
- BaseController
- StoreController
- Spree::PoliciesController
- Defined in:
- app/controllers/spree/policies_controller.rb
Instance Method Summary collapse
Methods inherited from StoreController
#current_taxon, #default_products_sort, #permitted_products_params, #products_filters_params, #render_404_if_store_not_exists, #store_filter_names, #store_filter_names_hash
Methods included from AnalyticsHelper
#analytics_event_handlers, #track_event, #unsupported_event?, #visitor_id
Methods included from WishlistHelper
Methods included from PasswordProtected
Methods included from StorefrontHelper
#as_aspect_ratio, #page_description, #page_image, #paths_equal?, #render_storefront_partials, #show_account_pane?, #svg_country_icon, #tailwind_classes_for
Methods included from ThemeConcern
#default_url_options, #set_theme_view_paths
Instance Method Details
#show ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/spree/policies_controller.rb', line 3 def show if params[:id].in?(supported_policies) @policy = case params[:id] when 'privacy_policy' current_store.customer_privacy_policy when 'terms_of_service' current_store.customer_terms_of_service when 'returns_policy' current_store.customer_returns_policy when 'shipping_policy' current_store.customer_shipping_policy end else raise ActiveRecord::RecordNotFound end end |