Hi John<br><br>Sorry I'm late to the discussion, but couldn't you just do this?<br><br>class Cycle < ActiveRecord::Base<br><br> before_save :ensure_pattern_has_correct_length<br><br> private<br><br> def ensure_pattern_has_correct_length
<br> self.pattern = some_padding_function( @pattern )<br> end<br><br>end<br><br>... or am I missing something?<br><br>Cheers<br><br>David<br><br><br><div><span class="gmail_quote">On 17/08/07, <b class="gmail_sendername">
John Winters</b> <<a href="mailto:john@sinodun.org.uk">john@sinodun.org.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks to all - some very constructive pointers there.<br><br>It's nice to find an environment where people understand the question,<br>"What's the *right* way to do it?".<br><br>Cheers,<br>John<br>_______________________________________________
<br>Chat mailing list<br><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br></blockquote></div>
<br>