Class: Publinator::PublishableType

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/publinator/publishable_type.rb

Class Method Summary collapse

Class Method Details

.matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
# File 'app/models/publinator/publishable_type.rb', line 5

def self.matches?(request)
  pt = self.find_by_name(request.path_parameters[:publishable_type].singularize.capitalize)
  return pt.present?
end