Class: SolidusContent::Providers::SolidusStaticContent

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_content/providers/solidus_static_content.rb

Class Method Summary collapse

Class Method Details

.call(input) ⇒ Object



7
8
9
10
11
# File 'lib/solidus_content/providers/solidus_static_content.rb', line 7

def call(input)
  slug = input.dig(:options, :slug) || input[:slug]

  input.merge(data: Spree::Page.find_by!(slug: slug).attributes.symbolize_keys)
end

.entry_fieldsObject



17
18
19
# File 'lib/solidus_content/providers/solidus_static_content.rb', line 17

def entry_fields
  %i[slug]
end

.entry_type_fieldsObject



13
14
15
# File 'lib/solidus_content/providers/solidus_static_content.rb', line 13

def entry_type_fields
  []
end