public
Rubygem
Description: Vanilla in Ruby
Homepage: http://lazyatom.com
Clone URL: git://github.com/lazyatom/vanilla-rb.git
We should be able to explicitly set the created_at date for a snip, when 
creating through the web interface.
lazyatom (author)
Sun Jun 01 06:26:54 -0700 2008
commit  cb4fa30bcd6e7e276cc82d1f51ee85f4cfb77835
tree    0b49eff25d9470a9b7204691139b8bfabd8704d2
parent  673781379135c35eaefb52a6b5546e889d44761c
...
27
28
29
30
 
31
32
33
...
27
28
29
 
30
31
32
33
0
@@ -27,7 +27,7 @@ class EditSnip < Dynasnip
0
     snip.save
0
     %{Saved snip #{Vanilla::Routes.link_to snip_attributes[:name]} ok}
0
   rescue Exception => e
0
-    snip_attributes[:created_at] = Time.now
0
+    snip_attributes[:created_at] ||= Time.now
0
     Soup << snip_attributes
0
     %{Created snip #{Vanilla::Routes.link_to snip_attributes[:name]} ok}
0
   end

Comments