Class: EmbeddedProductAsset
- Inherits:
-
EmbeddedAsset
- Object
- ActiveRecord::Base
- ApplicationRecord
- EmbeddedAsset
- EmbeddedProductAsset
- Defined in:
- app/models/embedded_product_asset.rb
Overview
== Schema Information
Table name: embedded_assets
Database name: primary
id :bigint not null, primary key
asset_type :string
options :jsonb not null
parent_type :string not null
type :string
uuid :uuid not null
created_at :datetime not null
updated_at :datetime not null
asset_id :bigint
parent_id :bigint not null
Indexes
idx_embedded_assets_on_asset_and_type (asset_id,asset_type,type)
idx_embedded_assets_parent_asset (parent_type,parent_id,asset_type,asset_id)
index_embedded_assets_on_asset (asset_type,asset_id)
index_embedded_assets_on_type (type)
index_embedded_assets_on_uuid (uuid)
Constant Summary collapse
- PERMITTED_OPTIONS =
Product-specific permitted options for controller
%i[ locale show_price show_buy_button card_style ].freeze
Instance Attribute Summary
Attributes inherited from EmbeddedAsset
Instance Method Summary collapse
-
#render_options ⇒ Object
Returns render options formatted for ProductProvider/oEmbed.
Methods inherited from EmbeddedAsset
#asset, faqs, for_asset_type, for_parent, images, #parent, products, #to_param, videos
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::EventPublishable
Instance Method Details
#render_options ⇒ Object
Returns render options formatted for ProductProvider/oEmbed
48 49 50 51 52 53 54 55 |
# File 'app/models/embedded_product_asset.rb', line 48 def { locale: locale, show_price: show_price, show_buy_button: , card_style: card_style }.compact end |