app/models/snippet.rb in radiant-0.9.1 vs app/models/snippet.rb in radiant-1.0.0.rc1
- old
+ new
@@ -14,6 +14,10 @@
validates_format_of :name, :with => %r{^\S*$}
validates_uniqueness_of :name
object_id_attr :filter, TextFilter
+ def after_initialize
+ self.filter_id ||= Radiant::Config['defaults.snippet.filter'] if new_record?
+ end
+
end