lib/friendly_id/base.rb in friendly_id-5.0.0.rc1 vs lib/friendly_id/base.rb in friendly_id-5.0.0.rc2
- old
+ new
@@ -214,9 +214,13 @@
def friendly_id_config
@friendly_id_config ||= base_class.friendly_id_config.dup.tap do |config|
config.model_class = self
end
end
+
+ def primary_key_type
+ @primary_key_type ||= columns.find(&:primary).type
+ end
end
# Instance methods that will be added to all classes using FriendlyId.
module Model
def self.included(model_class)