Module: SimpleSlug
- Defined in:
- lib/simple_slug.rb,
lib/simple_slug/adapter.rb,
lib/simple_slug/railtie.rb,
lib/simple_slug/version.rb,
lib/simple_slug/history_slug.rb,
lib/simple_slug/model_addition.rb
Defined Under Namespace
Modules: ModelAddition Classes: Adapter, HistorySlug, Railtie
Constant Summary collapse
- STARTS_WITH_NUMBER_REGEXP =
/\A\d+/
- NUMBER_REGEXP =
/\A\d+\z/
- RESOLVE_SUFFIX_REGEXP =
/--\d+\z/
- VERSION =
'0.4.5'
- @@excludes =
%w(new edit show index session login logout sign_in sign_out users admin stylesheets javascripts images fonts assets)
- @@slug_regexp =
/\A(?:\w+[\w\d\-_]*|--\d+)\z/
- @@slug_column =
'slug'
- @@min_length =
3
- @@max_length =
191
- @@callback_type =
:before_validation
- @@validation =
true
Class Method Summary collapse
Class Method Details
.setup {|_self| ... } ⇒ Object
36 37 38 |
# File 'lib/simple_slug.rb', line 36 def self.setup yield self end |