Sha256: 59c938ce9313417494942247ca397a89deb78e525edb8be65a30be0680e0d6a0

Contents?: true

Size: 431 Bytes

Versions: 8

Compression:

Stored size: 431 Bytes

Contents

module Galakei::RouteConstraints
=begin
Galakei usually doesn't support PUT / DELETE requests, so you sometimes need to define somes for galakei. Use this route constraint to restrict those routes to requests from galakei only.

Example routes:

  put 'resend'
  get 'resend', :constraints => Galakei::RouteConstraints::GalakeiOnly

=end
  module GalakeiOnly
    def self.matches?(request)
      request.galakei?
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
galakei-0.15.2 lib/galakei/route_constraints/galakei_only.rb
galakei-0.15.1 lib/galakei/route_constraints/galakei_only.rb
galakei-0.15.0 lib/galakei/route_constraints/galakei_only.rb
galakei-0.14.4 lib/galakei/route_constraints/galakei_only.rb
galakei-0.14.3 lib/galakei/route_constraints/galakei_only.rb
galakei-0.14.2 lib/galakei/route_constraints/galakei_only.rb
galakei-0.14.1 lib/galakei/route_constraints/galakei_only.rb
galakei-0.14.0 lib/galakei/route_constraints/galakei_only.rb