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 8307739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:35:51+00:00 2026-06-08T18:35:51+00:00

I seeded a database with four different values in the result column. They’re supposed

  • 0

I seeded a database with four different values in the “result” column. They’re supposed to represent dollar values but that’s irrelevant.

10,000;  6,500; 1,000; and 0

In the model, I created this class method

 def self.result
    order("result DESC")
  end 

In the controller, I called it

@decisions = Decision.result

In the index, it’s listing them in the following order

  6,500;  
  10,000; 
  1,000; 
   0

When I switch DESC to ASC….

 def self.result
    order("result ASC")
  end 

it reverses the order

0
1,000; 
10,000;
 6,500;  
  • 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-08T18:35:53+00:00Added an answer on June 8, 2026 at 6:35 pm

    What is the data type of that column? If it’s a string then a string starting with 6 is “bigger” than one starting with 1

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

Sidebar

Related Questions

The database is seeded with values in english language and format, e.g., :hourlyrate =>
Bootstrap executes fine during run-app (database is seeded). But it doesn't appear to get
I have a database table called Genre with the following fields: Id (Seeded Primary
I am currently writing a script that intelligently strips a database down into a
My Oracle database returns the error: ORA-12899 - Value too large for column TIT.ESTADO_CIVIL
We have a postgresql database that is backed up nightly from a cron job
I have a SQL Server 2005 database that I'm trying to access as a
I am looking at a few different ways to get Rails 3 working (database
I always see in database articles or tutorials or... just everywhere where they use
I am using a legacy database which does a couple things that make sense

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.