If you look in the log can you see it doing the query to look for an
existing matching email or username?
Colin
>
> ActiveRecord::RecordNotUnique in RegistrationsController#create
> PGError: ERROR: duplicate key value violates unique constraint
> "index_users_on_username"
>
> There are other validations that work perfectly, but why aren't the
> uniqueness validations being performed before the DB create?
>
> --
> 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 rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
Can you post the code that does the save?
Is the model code you have shown above copied/pasted here from the rb file?
It should not make any difference but have you tried removing the case
sensitive parameter?
What happens if you make new records and save from the rails console?
Colin
>
>>
>>
>>
>> > ActiveRecord::RecordNotUnique in RegistrationsController#create
>> > PGError: ERROR: duplicate key value violates unique constraint
>> > "index_users_on_username"
>>
>> > There are other validations that work perfectly, but why aren't the
>> > uniqueness validations being performed before the DB create?
>>
>> > --
>> > 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 rubyonra...@googlegroups.com.
>> > To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
>> > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>> --
>> gplus.to/clanlaw
>
> --
> 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 rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.