On Sun, Jul 15, 2012 at 07:01:38AM -0700, Peter Brown wrote:
> Is there an approved way to add or register a new ARel visitor without
> adding it to the ARel source? Looking at the some of the source code<
https://github.com/rails/arel/blob/master/lib/arel/visitors/to_sql.rb#L434-466> it
Doing this is fine for now. The way the AST is translated to SQL won't
change, so this will probably not break in the future.
> I'm hoping there is a better way to deal with this problem, either with a
> less hacky ARel approach or something different all together.
It seems like we should be using the underlying database value (the
attribute value rather than the return value of the method call) for the
unique constraint. I think this might be a bug. Jon, wdyt?
--
Aaron Patterson
http://tenderlovemaking.com/