Search posts
This commit is contained in:
@@ -186,6 +186,16 @@ module Adamantium
|
||||
.order(:year)
|
||||
.to_a
|
||||
end
|
||||
|
||||
def search(term:)
|
||||
posts
|
||||
.where(post_type: "post", location: nil)
|
||||
.published
|
||||
.search(term: term)
|
||||
.combine(:tags)
|
||||
.order(Sequel.desc(:published_at))
|
||||
.to_a
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user