lib/friendly_id.rb
def generate_friendly_id
        slug_text = truncated_friendly_id_base
        if !Slug.find_by_name(slug_text)
          return slug_text
        else
          generate_friendly_id_with_extension(slug_text)
        end
      end
# Generate the text for the friendly id, ensuring no duplication.
Generate the text for the friendly id, ensuring no duplication.
Generate the text for the friendly id ensuring no duplication .
def generate_friendly_id
        slug_text = truncated_friendly_id_base
        if !Slug.find_by_name(slug_text)
          return slug_text
        else
          generate_friendly_id_with_extension(slug_text)
        end
      end
def generate_friendly_id slug_text = truncated_friendly_id_base if ! Slug . find_by_name ( slug_text ) return slug_text else generate_friendly_id_with_extension ( slug_text ) end end
Generate the text for the friendly id, ensuring no duplication.
Generate the text for the friendly id ensuring no duplication .