README.markdown in permalink-1.1.2 vs README.markdown in permalink-1.2.0

- old
+ new

@@ -2,11 +2,11 @@ ========= Instalation ----------- - gem install permalink + gem install permalink Usage ----- Add the method call `permalink` to your model. Your model should have a `permalink` attribute. @@ -38,17 +38,23 @@ The above settings will generate something link `100-some-title-page`. By overriding `to_param` method you don't have to change a thing on your app routes. If you want to generate unique permalink, use the `:unique` option: - class Page < ActiveRecord::Base - permalink :title, :unique => true, :to_param => :permalink - end + class Page < ActiveRecord::Base + permalink :title, :unique => true, :to_param => :permalink + end The permalink is generated using `ActiveSupport::Multibyte::Chars` class; this means that characters will properly replaced from `áéíó` to `aeio`, for instance. The permalink is created when `before_validation` callback is evaluated. This plugin also tries to generate a permalink when `before_save` callback is evaluated and the instance has no permalink set. + +You can force the permalink generation by setting the `:force` option. + + class Page < ActiveRecord::Base + permalink :title, :force => true + end ## License Copyright (c) 2011 Nando Vieira, released under the MIT license \ No newline at end of file