Sha256: dff25a125d63637ba4604e600ef429fef15c18ed52cf9f08e143350ded415b57
Contents?: true
Size: 663 Bytes
Versions: 11
Compression:
Stored size: 663 Bytes
Contents
module Locomotive module Concerns module Page module Redirect extend ActiveSupport::Concern included do ## fields ## field :redirect, type: Boolean, default: false field :redirect_url, type: String, localize: true, default: '' field :redirect_type, type: Integer, default: 301 ## validations ## validates_presence_of :redirect_type, if: :redirect? validates_presence_of :redirect_url, if: :redirect? validates_format_of :redirect_url, with: Locomotive::Regexps::URL_AND_MAILTO, allow_blank: true end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems