Sha256: dff578581403dc69f9c4aa2f43f6659617e6175110f0325fe3c69ab98329d36c
Contents?: true
Size: 349 Bytes
Versions: 3
Compression:
Stored size: 349 Bytes
Contents
class Profession < ActiveRecord::Base include Applicat::Mvc::Model::Resource::Base has_many :users validates :name, presence: true, uniqueness: true attr_accessible :name extend FriendlyId friendly_id :name, :use => :slugged private def should_generate_new_friendly_id? slug.blank? || name_changed? end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
voluntary-0.7.1 | app/models/profession.rb |
voluntary-0.7.0 | app/models/profession.rb |
voluntary-0.6.0 | app/models/profession.rb |