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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:06:23+00:00 2026-06-18T05:06:23+00:00

I have in my upload_controller following function: def analyse (current_user.uploads).perform_analysis respond_to do |format| format.html

  • 0

I have in my upload_controller following function:

 def analyse
    (current_user.uploads).perform_analysis        
     respond_to do |format|
       format.html { redirect_to :back }
     end

meaning, that perform_analysis will analyse uploads only of one specific user, who is now online, say user A.

perform_analysis is situated in upload model.

 def self.perform_analysis
    blablabal
    @upload=Upload.find_by_arraydb_file_name(x)
    @upload.update_attributes(blablabla)
  end

x is the name of the upload-file.

My problem is, that by calling this line

@upload=Upload.find_by_upload_file_name(x)

database has the following request:

select upload from uploads  WHERE current_user=user A AND upload_file_name=x

I want the request to be only WHERE upload_file_name=x without current_user

How can I do it?

  • 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-18T05:06:25+00:00Added an answer on June 18, 2026 at 5:06 am

    current_user.uploads brings WHERE current_user=user in sql query.

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

Sidebar

Related Questions

In my Codeigniter controller have the following private function which validates file uploads. private
I am following the CakePHP ACL tutorial http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html I have a controller called ImagesController
I would like to test the following helper module function: module UploadsHelper def custom_img_tag(upload,
I have the following form declaration for a new kindergarten <%= form_for @kindergarten, :html
I have the following form setup: <html> <head></head> <body> <form method=post enctype=multipart/form-data action=FileUpload> <table>
i have upload a model with the following model loader in my Opengles code
I have an upload script that write a index.html file, I modified it to
I have the following remote form_tag, whose goal is to POST the following params:
I have the following image upload code and controller. The hidden ID is POSTing
I have the following MVC form and controller to upload an image for merchandise

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.