<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Sounds like sensible advice - thank you.<br><br>David<br></div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Matthew Rudy Jacobs <matthewrudyjacobs@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> London Ruby Users Group <chat@lists.lrug.org><br><b><span style="font-weight: bold;">Sent:</span></b> Friday, 29 July, 2011 12:41:44<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [LRUG] Fixing Time marshalling<br></font><br>I don't know about pushing rails core to release your code<div>(For the last couple of years their workload has been too big to
cope)</div><div><br></div><div>The best place to ask would be the rails-core mailing list.</div>
<div><br></div><div>But generally I include these sorts of hacks in initializers.</div><div><br></div><div>config/initializers/time-marshalling.rb</div><div><br></div><div>I'd include a comment as to when and why you did it</div>
<div>and at the same time copy over the test from the rails code.</div><div><br></div><div>Hopefully at some later point you can remove the initializer, and if the test passes, you should be good to go.</div><div><br></div>
<div><br><div class="gmail_quote">On 29 July 2011 09:19, David Waller <span dir="ltr"><<a rel="nofollow" ymailto="mailto:david.a.waller@btinternet.com" target="_blank" href="mailto:david.a.waller@btinternet.com">david.a.waller@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;"><div>Hello LRUG,<br><br>I've tripped over a bug in Rails 3.0.9, where fractional seconds aren't preserved when marshalling-unmarshalling a Time object. (Hence breaking Times that I stored in a session.) This bug has already been fixed [1] but despite that fix having been made in April, it wasn't included in Rails 3.0.9 when that was released in June. <br>
<br>For now I've solved my own problem by copying the relevant part of the ActiveSupport time/marshal.rb into my config/application.rb, so overriding the Rails override with a fixed version. That's okay for me, but is there a thing I should be doing to ensure that this fix makes it into Rails 3.0.10, and so doesn't affect anyone else? (And allows me to remove the ugly hack from my application.rb.) Or do I just trust that
the powers behind Rails have already considered this and decided not to?<br><br>Thanks,<br><br>David<br><br><span>[1] <a rel="nofollow" target="_blank" href="https://github.com/rails/rails/commit/96546bb63bd5f1b24f5126e7a3314580bc59584f">https://github.com/rails/rails/commit/96546bb63bd5f1b24f5126e7a3314580bc59584f</a></span><br>
</div>
</div></div><br>_______________________________________________<br>
Chat mailing list<br>
<a rel="nofollow" ymailto="mailto:Chat@lists.lrug.org" target="_blank" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>
</div></div>
</div></body></html>