-
Notifications
You must be signed in to change notification settings - Fork 0
Extends Ruby on Rails's ActiveRecord::Base to mimick MySQLs "REPLACE INTO" for all databases.
License
jensb/create_or_update_by
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
CreateOrUpdateBy ================ This plugin mimicks something like MySQL REPLACE INTO mechanism, in which you can specify a primary key, and depending on whether a record exists already, it will be replaced or newly created. This plugin does the same, but allows not only primary keys to be specified as search conditions, but ANY column, or ANY two columns. Idea and longer introduction: http://www.intridea.com/2008/2/19/activerecord-base-create_or_update-on-steroids-2 Idea for extension to include two find parameters / conditions (found via Google): http://github.com/jeremymcanally/docbox/tree/57215361c3a585a9608bee25cd6e4659c780ff17/lib/core_ext.rb Tests, pluginization and documentation: me. Copyright (c) 2009 Jens Benecke <jens-rails@spamfreemail.de>, released under the MIT license.
About
Extends Ruby on Rails's ActiveRecord::Base to mimick MySQLs "REPLACE INTO" for all databases.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published