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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:06:36+00:00 2026-05-15T18:06:36+00:00

In my app, I’ve got a little box that appears on every page, checking

  • 0

In my app, I’ve got a little box that appears on every page, checking on the status of requests made by the user. If a request is accepted at any time, then the user should automatically be taken to a certain page. This is my code so far:

 <% offersMade.each do |w| %>
  <% if w.accepted == true %>
   <% redirect_to offer_path(:email => "email@gmail.com") %>
  <% end %>
 <% end %>

But I’m getting this error:

undefined method `redirect_to' for #<ActionView::Base:0x1042a9770>

Is it not possible to user redirect_to in a view? If not, is there something else I can use? Thanks for reading.

  • 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-15T18:06:37+00:00Added an answer on May 15, 2026 at 6:06 pm

    redirect_to is a method of ActionController::Base Class so you can not use it in ActionView.

    You can try following

    <% if w.accepted == true  %>
      <script type="text/javascript">
        window.location.href="/logins/sign_up"  // put your correct path in a string here
      </script>
    <% end %>
    

    Edited for the email parameter

    window.location.href="/logins/sign_up?email=<%= w.email %>"
    

    Sorry i don’t know if there is anything in ruby for that.

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

Sidebar

Related Questions

My app got rejected by Apple three times, all with the same rejection letter,
My app uses the android.support.v4.view.ViewPager class. For each page in the ViewPager, I want
app.use(express.compiler({ src: __dirname + '/public', enable: ['less'] })); That's the line in my app.js
App having screen1, screen2, screen3 , screen4 user can go to screen3 from remaining
App store approval guideline says that Apps that send Push Notifications without first obtaining
app.get(/:name?/:group?, function(req, res){... is matching files that are in my public directory. So if
My app only allows access if the current user is a specific type, this
I am writing an app with both english and french support. The app requests
app link: http://itunes.apple.com/en/app/quick-tweet/id505987287?mt=12 How can i make something like that circle? is that a
My app is a converter with a multicomponent picker wheel. It is made for

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.