lib/friendly_id/base.rb in friendly_id-5.0.4 vs lib/friendly_id/base.rb in friendly_id-5.0.5
- old
+ new
@@ -12,11 +12,11 @@
include FriendlyId
friendly_id :bar, :use => [:slugged, :simple_i18n]
end
The most important option is `:use`, which you use to tell FriendlyId which
-addons it should use. See the documentation for this method for a list of all
+addons it should use. See the documentation for {FriendlyId::Base#friendly_id} for a list of all
available addons, or skim through the rest of the docs to get a high-level
overview.
*A note about single table inheritance (STI): you must extend FriendlyId in
all classes that participate in STI, both your parent classes and their
@@ -220,10 +220,10 @@
config.model_class = self
end
end
def primary_key_type
- @primary_key_type ||= columns.find { |c| c.name == primary_key}.type
+ @primary_key_type ||= columns_hash[primary_key].type
end
end
# Instance methods that will be added to all classes using FriendlyId.
module Model