Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class User < ActiveRecord::Base
default_scope { where(active: true) }
validates :username, uniqueness: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment