Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8723891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:43:12+00:00 2026-06-13T07:43:12+00:00

I have Devise setup to allow login with email or username. With your username

  • 0

I have Devise setup to allow login with email or username. With your username you can have a vanity URL like so: vanity.com/username. My User model thus has attr_accessible :username as well as attr_accessor :login.

To prevent usernames from colliding with future features, I want to implement a blacklist on certain usernames. You can see a nice example list in use by GitHub here.

I’m new to Devise and have searched the how-to’s in their wiki to see if this use case or anything like it is covered there. It doesn’t seem to be.

How can I blacklist certain usernames for registration in Devise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:43:13+00:00Added an answer on June 13, 2026 at 7:43 am

    There was an easier way to do this than having to modify Devise’s controllers.

    In the User model all I had to do was:

    validates :username, :exclusion => %w(about blog ...)
    

    Way too simple.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a devise user model with pro boolean column.I want to build a
I'm working with Rails 3.2.2. And I have a devise model called user. In
I have a User model with devise, a Team model, a Player model and
I have some rails application with MongoDB, Mongoid mapper and devise. Аuthorized user can
I have two devise models: User and Member As such, I'm specifying authentication keys
I have a Mobile App (iPhone and Android) which allows user to login to
I am using the Devise gem and I have an initializer to setup mail
I've looking for a way to allow users to change their settings (User model)
I have a simple setup with Cancan and Devise. I wanna show the edit
I have successfully implemented login with Facebook using Devise and OmniAuth (built into Devise).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.