Reputation: 962
so I'm trying to make usernames case_insensitive on my rails app and having added :case_sensitive => false to my development code works just fine but when I push to heroku it doesn't make any bit of difference.
What gives?
any ideas?
class User < ActiveRecord::Base
validates :name, presence: true, :uniqueness => { :case_sensitive => false }
validates_format_of :email,:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
has_many :feeds, :through => :subscriptions, dependent: :destroy
has_many :subscriptions
has_secure_password
Upvotes: 0
Views: 512
Reputation: 962
Turns out that since PostgreSQL is inherently case-sensitive, adding the case_insensitive validation to a model has no effect on a Postgresql db backed app
Upvotes: 2