Add dynamic pages to main menu
This commit is contained in:
@@ -6,6 +6,14 @@ module Adamantium
|
||||
.published
|
||||
.where(slug: slug).one!
|
||||
end
|
||||
|
||||
def for_main_nav
|
||||
pages
|
||||
.select(:name, :slug, :light_colour, :dark_colour, :published_at)
|
||||
.published
|
||||
.where(main_menu: true)
|
||||
.to_a
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user