lib/friendly_id/base.rb in friendly_id-5.1.0 vs lib/friendly_id/base.rb in friendly_id-5.2.0.beta.1

- old
+ new

@@ -242,10 +242,11 @@ send friendly_id_config.query_field end # Either the friendly_id, or the numeric id cast to a string. def to_param - if diff = changes[friendly_id_config.query_field] + if attribute_changed?(friendly_id_config.query_field) + diff = changes[friendly_id_config.query_field] diff.first || diff.second else friendly_id.presence.to_param || super end end