Module: PermalinkFu::ToParamWithID
- Defined in:
- lib/permalink_fu.rb
Instance Method Summary collapse
Instance Method Details
#to_param ⇒ Object
84 85 86 87 88 |
# File 'lib/permalink_fu.rb', line 84 def to_param permalink = send(self.class.read_inheritable_attribute(:permalink_field)) return super if new_record? || permalink.blank? "#{id}-#{permalink}" end |