Sha256: ed52b463d88878de63152c02763b7f04bef01c4c6773e43995427e982031af2d

Contents?: true

Size: 264 Bytes

Versions: 1

Compression:

Stored size: 264 Bytes

Contents

class PageConstraint
  def self.matches?(request)
    return false unless %w[html json js].include?(request.format.to_s.split("/")[1])
    return false unless page = Cardboard::Url.urlable_for(request.params[:id])
    page.class.name == "Cardboard::Page"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cardboard_cms-0.3.1 lib/cardboard/constraints/page_constraint.rb