Sha256: b1ec7a74d6f8f9bef5e0ec11912a791e6bcd90982206ee4105a65d317970b9ac
Contents?: true
Size: 946 Bytes
Versions: 1
Compression:
Stored size: 946 Bytes
Contents
require 'simple_slug/version' require 'active_support/core_ext' require 'simple_slug/model_addition' require 'simple_slug/railtie' if Object.const_defined?(:Rails) module SimpleSlug autoload :HistorySlug, 'simple_slug/history_slug' mattr_accessor :excludes @@excludes = %w(new edit show index session login logout sign_in sign_out users admin stylesheets assets javascripts images) mattr_accessor :slug_regexp @@slug_regexp = /\A\w+[\w\d\-_]*\z/ mattr_accessor :slug_column @@slug_column = 'slug' mattr_accessor :max_length @@max_length = 240 mattr_accessor :callback_type @@callback_type = :before_validation mattr_accessor :add_validation @@add_validation = true STARTS_WITH_NUMBER_REGEXP =/\A\d+/ CYRILLIC_LOCALES = [:uk, :ru, :be].freeze def self.setup yield self end def self.normalize_cyrillic(base) base.tr('АаВЕеіКкМНОоРрСсТуХх', 'AaBEeiKkMHOoPpCcTyXx') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_slug-0.3.4 | lib/simple_slug.rb |