Class: Spree::Pages::Post
Instance Method Summary
collapse
Methods inherited from Spree::Page
#create_preview, #custom?, #display_name, #duplicate, #layout_sections?, #linkable?, #preview_url, #promote, #store, #theme
#preview?
Instance Method Details
#customizable? ⇒ Boolean
22
23
24
|
# File 'app/models/spree/pages/post.rb', line 22
def customizable?
true
end
|
#default_sections ⇒ Object
16
17
18
19
20
|
# File 'app/models/spree/pages/post.rb', line 16
def default_sections
[
Spree::PageSections::PostDetails.new,
]
end
|
#icon_name ⇒ Object
12
13
14
|
# File 'app/models/spree/pages/post.rb', line 12
def icon_name
'article'
end
|
#page_builder_url ⇒ Object
4
5
6
7
8
9
10
|
# File 'app/models/spree/pages/post.rb', line 4
def page_builder_url
return unless page_builder_url_exists?(:post_path)
post = store.posts.published.last || store.posts.last
return if post.nil?
Spree::Core::Engine.routes.url_helpers.post_path(post)
end
|