# Friendly\_id / acts\_as\_referenced conflict?

**URL:** <https://www.ruby-forum.com/t/friendly-id-acts-as-referenced-conflict/160760>\
**Category:** Rails\
**Created:** [February 19, 2009, 12:58pm UTC](https://www.ruby-forum.com/t/friendly-id-acts-as-referenced-conflict/160760 "2009-02-19T12:58:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noddy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ac8455/32.png) [@noddy](https://www.ruby-forum.com/u/noddy)\
**Post date:** [February 19, 2009, 12:58pm UTC](https://www.ruby-forum.com/t/friendly-id-acts-as-referenced-conflict/160760/1 "2009-02-19T12:58:53Z")

</div>

Hi,

I’m using acts\_as\_referenced to generate unique references:

# property.rb

class Property \< ActiveRecord::Base  
acts\_as\_referenced :referenced\_column =\> “permalink”  
end

I would now like to use friendly\_id to create seo friendly URLs instead  
of using the id.

I now have:

# property.rb

class Property \< ActiveRecord::Base  
acts\_as\_referenced :referenced\_column =\> “permalink”  
has\_friendly\_id :permalink, :use\_slug =\> true  
end

The above code generates a “slug text is blank” error - I assume this is  
due to acts\_as\_referenced using a before\_save callback to generate the  
permalink which friendly\_id is looking for.

Is it possible to get the two plugins working together? Initialize the  
acts\_as\_referenced first?
