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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:30:53+00:00 2026-06-01T16:30:53+00:00

My controller file looks like this: class QuotesController < ApplicationController def show @quote =

  • 0

My controller file looks like this:

class QuotesController < ApplicationController

  def show
    @quote = Quote.find(params[:id])
    @popup = params[:popup]

    respond_to do |format|
      if @popup.present?
        format.html { render layout: false }
      else
        format.html
      end
      format.json { render json: @quote }
    end
  end

  def create    
    @quote = Quote.new(params[:quote])
    respond_to do |format|
      if @quote.save
        format.html { redirect_to @quote, notice: "Quote was successfully created.", popup: "1" }
        format.json { render json: @quote, status: :created, location: @quote }
      else
        format.html { render action: "errors", layout: false }
        format.json { render json: @quote.errors, status: :unprocessable_entity }
      end
    end
  end

end

If I visit http://localhost:3000/quotes/1?popup=1 — the view correctly displays without application_layout

However, if I am coming from the CREATE action, it seems ?popup=1 is never being appended to the URL – and therefore the application_layout is displaying when it should not be

I thought that adding popup: “1” to the redirect_to line was supposed to pass a param via GET

Can anyone see what I am missing?

Thanks

  • 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-01T16:30:55+00:00Added an answer on June 1, 2026 at 4:30 pm

    Edit: tried this on my machine and it worked:

    { redirect_to quote_path(@quote, :popup => "1"), notice: "Quote was successfully created." }

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

Sidebar

Related Questions

I have a Controller called Register that looks like this: class Register extends CI_Controller
I've got class named PagedList which looks like this: public class PagedList<T> : List<T>
I have this simple code in my user_controller.rb file #listing all users def index
I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like
I have a root view controller with no nib file, I tried adding this
I have a view file like this : <html> <head> <meta name=layout content=main />
In my CI system\libraries directory I have a new class named DD_Controller.php. This file
Ok I have adopted a CodeIgniter Setup, My route.php in config looks like this:
Edit: How to return/serve a file from a python controller (back end) over a
How can one best test a controller action which receives a file upload using

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.