Sha256: 3bbd0fd170b37783255ab2b64efa80f306e9ecbee035760c9665fa7346321890
Contents?: true
Size: 533 Bytes
Versions: 16
Compression:
Stored size: 533 Bytes
Contents
module Enjoy module Models module PageBlock extend ActiveSupport::Concern include Enjoy.orm_specific('PageBlock') included do validates :file_path, format: { # with: /\A(?!layouts\/).*\Z/, without: /\Alayouts\/.*\Z/, message: "Недопустимый путь к файлу" } attr_accessor :file_pathname after_initialize do self.file_pathname = Pathname.new(file_path) unless file_path.nil? end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems