You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README
+4-1
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,19 @@ These are set to nil if Iconv is not loaded. You can also manually set them to
22
22
Use the :if or :unless options to specify a Proc, method, or string to be called or evaluated. The permalink
23
23
will only be generated if the option evaluates to true.
24
24
25
+
25
26
[Added 3.11.2009 by Martin Emde] Make permalink_fu update your permalink everytime the dependent field(s) change.
26
27
27
28
class Article < ActiveRecord::Base
28
29
has_permalink :title, :update => true
29
30
end
30
31
32
+
This will update your permalink every time title changes. Rails versions with _changed? methods will reduce the checks for uniqueness to only when the permalink field is changed.
33
+
31
34
Without :update set to true, your permalink will be set one time and subsequent changes to the field
32
35
(title in this example) will not affect the permalink field. To regenerate the permalink field,
33
36
set it to nil or a blank string within your model.
34
37
35
38
Old versions of rails without _changed? attribute support will result in the permalink field being regenerated every save.
36
39
37
-
[Fixed 3.11.2009 by Martin Emde] Permalink was not being checked for uniqueness when set directly with permalink=
40
+
[Bug Fixed 3.11.2009] Permalink was not being checked for uniqueness when set directly with permalink= on rails versions with _changed?
0 commit comments