Class: Comatose::Routes::LocaleConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/comatose/locale_constraint.rb

Class Method Summary collapse

Class Method Details

.matches(request) ⇒ Object



7
8
9
# File 'lib/comatose/locale_constraint.rb', line 7

def matches(request)
  request.params[:locale] =~ /^[a-z]{2}(-[a-z]{2}){0,1}$/
end