Sha256: 28c5a15229cb7e36648257d98d220a7de3de2ad97d80709bbbe43248425abbfd

Contents?: true

Size: 513 Bytes

Versions: 6

Compression:

Stored size: 513 Bytes

Contents

module Locomotive
  module Extensions
    module Page
      module Redirect

        extend ActiveSupport::Concern

        included do

          ## fields ##
          field :redirect,      :type => Boolean, :default => false
          field :redirect_url,  :type => String

          ## validations ##
          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

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc7 app/models/locomotive/extensions/page/redirect.rb
locomotive_cms-2.0.0.rc6 app/models/locomotive/extensions/page/redirect.rb
locomotive_cms-2.0.0.rc5 app/models/locomotive/extensions/page/redirect.rb
locomotive_cms-2.0.0.rc4 app/models/locomotive/extensions/page/redirect.rb
locomotive_cms-2.0.0.rc2 app/models/locomotive/extensions/page/redirect.rb
locomotive_cms-2.0.0.rc1 app/models/locomotive/extensions/page/redirect.rb