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

  • Home
  • SEARCH
  • 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 6538091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:41:40+00:00 2026-05-25T10:41:40+00:00

I have a batch invite command where users can enter a bunch of emails

  • 0

I have a batch invite command where users can enter a bunch of emails to invite people to an account in my app. However, up until now, it was including one space at the front of every e-mail…

I’ve since added a .strip for every new email, but I now want to update all previously created accounts.

I am running the app on heroku, so I’d imagine it will be a command at the heroku console, I just don’t want to feck it up, so I’m asking for help here.

Nevermind, I figured it out.

     User.all.each do |user|; user.update_attributes(:email => user.email.split); end

That was the solution. Just a little tricky figuring out that Heroku only works with one line at a time, unlike the actual rails console.

  • 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-05-25T10:41:41+00:00Added an answer on May 25, 2026 at 10:41 am

    If you can execute SQL via the rails console. Try

    begin; update users set email = trim(email); commit;

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

Sidebar

Related Questions

I have a batch file (in windows XP, with command extension activated) with the
I have a batch file that automates copying a bunch of files from one
We have a batch program that incorporates JavaMail 1.2 that sends emails. In our
I have a batch file that is using the exit command to return an
I have a batch file that outputs a list of commands which themselves can
I have a batch file that was created for an Oracle database that I'm
I have this batch that needs to run that the user has to execute
I have a batch file that installs WinVNC in about 1 second and starts
I have a batch file with the following code: for /f tokens=* %%a in
I have a batch file that is running inside CruiseControl and outputing either Pass

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.