Class: C80Catoffers::Category

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
FriendlyId
Defined in:
app/models/c80_catoffers/category.rb

Instance Method Summary collapse

Instance Method Details

#normalize_friendly_id(input) ⇒ Object



12
13
14
# File 'app/models/c80_catoffers/category.rb', line 12

def normalize_friendly_id(input)
  input.to_s.to_slug.normalize(transliterations: :russian).to_s
end

#slug_candidatesObject



16
17
18
# File 'app/models/c80_catoffers/category.rb', line 16

def slug_candidates
  [:title] + Array.new(6) {|index| [:title, index+2]}
end