Sha256: 914ed07ee7baf47b9024cf35f993a06008b60254956b450e73cf7f5765c97e86
Contents?: true
Size: 587 Bytes
Versions: 3
Compression:
Stored size: 587 Bytes
Contents
# Used to test slug behavior in general class Article < ActiveRecord::Base slug :headline end # Used to test alternate slug column class Person < ActiveRecord::Base slug :name, :column => :web_slug end # Used to test invalid method names class Company < ActiveRecord::Base slug :name end class Post < ActiveRecord::Base slug :headline, :validate_uniqueness_if => Proc.new { false } end # Used to test slugs based on methods rather than database attributes class Event < ActiveRecord::Base slug :title_for_slug def title_for_slug "#{title}-#{location}" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
slug-0.8.0 | test/models.rb |
slug-0.6.1 | test/models.rb |
slug-0.6.0 | test/models.rb |