Some refactoring:
quotedName = repository.adapter.send(:with_connection) do |c|
c.quote_value(name)
end
But it's still ugly in my opinion.
On Mar 26, 12:39 pm, DMG <[email protected]> wrote:
> I need to quote one value and I end up with this code:
>
> conn = nil
>
> repository.adapter.instance_eval do
> with_connection do |connection|
> conn = connection
> end
> end
>
> name = conn.quote_value(name.to_s)
>
> Is there any not so verbose way to do this?
>
> Thanks,
> Dawid
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.