Class: Constraints::JournalPosts

Inherits:
Object
  • Object
show all
Defined in:
lib/constraints/posts.rb

Class Method Summary collapse

Class Method Details

.matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/constraints/posts.rb', line 3

def self.matches?(request)
  int_id = request.params[:hex].to_i(16)
  JournalPost.not_hidden.published.where(int_id: int_id).size > 0
end