class CustomProfile

Public Instance Methods

to_s() click to toggle source
# File lib/buweb/custom_profile.rb, line 28
def to_s
  type
end

Private Instance Methods

set_slug() click to toggle source
# File lib/buweb/custom_profile.rb, line 33
def set_slug
  self.slug ||= person.slug
end
slug_available() click to toggle source
# File lib/buweb/custom_profile.rb, line 37
def slug_available
  unless slug.present? || person.slug.present?
    errors.add(:slug, "cannot be automatically generated. Please add a slug to the person's bio first.")
  end
end