Sha256: f69ba91acaad12e53098f4eabb2ca5c92d88014bdee00f6be0de222c6d8ba8b7
Contents?: true
Size: 722 Bytes
Versions: 4
Compression:
Stored size: 722 Bytes
Contents
module Notee module Helper def get_all_notees @notees = Notee::Post.where(status: 1) end def get_secret_notees @notees = Notee::Post.where(status: 2) end def get_notees_by_category_slug(category_slug) return false unless category_slug category_id = Notee::Category.find_by(name: category_slug) return false unless category_id @notees = Notee::Post.where(category_id: category_id, status: 1) end def get_notee_by_id(id) return false unless id @notee = Notee::Post.find_by(id: id, status: 1) end def get_notee_by_slug(slug) return false unless slug @notee = Notee::Post.find_by(slug: slug, status: 1) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
notee-0.3.0 | lib/notee/helper.rb |
notee-0.2.9 | lib/notee/helper.rb |
notee-0.2.8 | lib/notee/helper.rb |
notee-0.2.7 | lib/notee/helper.rb |