Sha256: f3961db0c6af3a24a38d54e448b5287200f4d55e037136f54ef6a50de1b0c6e5
Contents?: true
Size: 652 Bytes
Versions: 10
Compression:
Stored size: 652 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, allow_blank: true end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems