Friendly_id using value from belongs_to association
问题 I have the following models: class User < ActiveRecord::Base extend FriendlyId friendly_id :first_name, :use => :slugged has_one :professor after_create :create_professor def create_professor self.professor = Professor.create end end class Professor < ActiveRecord::Base extend FriendlyId friendly_id :first_name, :use => :slugged belongs_to :user def first_name user.first_name end end At the time that create_professor is called and therefore the execution passes to the Professor model ( self