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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:18:43+00:00 2026-06-06T03:18:43+00:00

How can I search first in model (i know how to do this). And

  • 0

How can I search first in model (i know how to do this). And then search in this array for more concretence? As you see:

@articles = Article.find(:all, :conditions => { :ART_ID => @search.map(&:ARL_ART_ID)})
@a = @articles.find_all{|item| item.ART_ARTICLE_NR == search.upcase }

First i search in model, but thanks to my db) it have many wrong results, so i must to clarify my array. But there how to search like sql:

like % %

Now it search very strong: if i search AC451, it’s good, but if AC45 or C451 it’s nothing fetches. How to say him so that before and after

search

could be everything?

  • 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-06T03:18:44+00:00Added an answer on June 6, 2026 at 3:18 am

    Like this, maybe?

     item.ART_ARTICLE_NR.include?(search.upcase)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is quite weird but my search function can search for any word except
First of all, I'm sorry about the feedback-nature of this question. I'm trying to
I'm aware that I can search queries by calling where() on a model as
Can search engines such as Google index JavaScript generated web pages? When you right
I'm writing a library search engine where a user can search based on various
I'm creating a Java application where the user can search through a list of
Let's say I have a form where users can search for people whose name
I am wanting to allow users to tag items so that they can search
In sharepoint 2007 sites, we can search for people or other contents. Is the
I have a problem with my search query, $s_query. The user can search a

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.