lib/friendly_id.rb in friendly_id4-4.0.0.beta5 vs lib/friendly_id.rb in friendly_id4-4.0.0.beta6

- old
+ new

@@ -79,11 +79,11 @@ @author Norman Clarke =end module FriendlyId # The current version. - VERSION = "4.0.0.beta5" + VERSION = "4.0.0.beta6" @mutex = Mutex.new autoload :History, "friendly_id/history" autoload :Reserved, "friendly_id/reserved" @@ -123,17 +123,19 @@ ActiveRecord::Relation.send :include, FriendlyId::FinderMethods end # Set global defaults for all models using FriendlyId. # + # The default defaults are to use the +:reserved+ module and nothing else. + # # @example # FriendlyId.defaults do |config| # config.base = :name # config.use :slugged # end def self.defaults(&block) @mutex.synchronize do @defaults = block if block_given? + @defaults ||= lambda {|config| config.use :reserved} end - @defaults end end \ No newline at end of file