Iam Trying to create authentications using devise with riak as the database. I found a ORM strategy for the same https://github.com/frank06/devise-ripple, it does work all fine except for the part that when i try to register with a email which is already present in the db it does not provide a error message instead it overwrites the present data and updates it. The problem I figured is that ripple deals with .save() differently than active record, ie when active record would throw and error Ripple just overwrites it.
Iam Trying to create authentications using devise with riak as the database. I found
Share
Since Riak doesn’t have a concept of unique fields, you’re going to have to check the uniqueness on the app level of your stack.
The way I’d do it is a quick m/r function or even a search/2i check for the count of documents that have the e-mail value you’re validating. Everything above 0 is obviously a failed validation.