Mark Reginald James wrote:
> os = sanitize("/#{old_name}/")
> ns = sanitize("/#{new_name}/")
Whoops, you'd need to add the prefix /path/to on these
to ensure you only replace the name in the correct context.
> Person.update_all "key = replace(key, #{os}, #{ns})",
> ['key like ?', "/path/to/#{old_name}/%"]
--
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---