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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:41:08+00:00 2026-05-25T17:41:08+00:00

I have a form with one input field — a textarea — and when

  • 0

I have a form with one input field — a textarea — and when the user submits the form I want to save the value of the textarea to the session. How do I do that, in Rails?

I’m using Devise, and the page I’m sending the user to after they submit the form is my Devise registration page.

So I imagine I need something like this in the registrations controller action:

session[:text_entered] = params()

…but Devise doesn’t give me a registrations controller. Do I need to make one?

Am I stuck with a super long URL when the form gets submitted? Should this be a POST or a GET? How do I pass the textarea value to the registrations page without sending it as a URL parameter?

Sorry I’m a newbie. Thanks for any help!

  • 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-25T17:41:09+00:00Added an answer on May 25, 2026 at 5:41 pm

    So, you have a controller for the page that the textarea is on, let’s call it “SomethingsController.” And the controller the form on that page submits to is, I gather, RegistrationsController. Instead of handling the submission of that form in RegistrationsController, what I would do is let SomethingsController handle it.

    When you POST the form to SomethingsController (and yes, you should POST) it will fire the create action, and there you’ll get the value from params (which is a Hash–you access its values with []) and put it in session. Once you’ve done that you can redirect the user to the registration page. Something like this:

    SomethingsController < ActionController::Base
      def create
        if text = params[:text_area_name] && text.present?
          session[:text_entered] = text
          redirect_to new_user_registration_path
        else
          flash[:error] = "You didn't enter any text!"
          render :action => :new
        end
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using web forms I know that you can only have one ASP.NET form on
In an HTML-document, i want to have a (if possible: invisible) form that POSTs
IDE: Microsoft Visual Studio Professional 2008 Language: C# Background: I have one form and
I'm working on a C# program, and right now I have one Form and
I have an application with one form in it, and on the Load method
When submitting one form from view, how can i also read or have controller
I have a form with thousands of checkboxes, and when one is checked, I
Is it legal to have an HTML form with more than one hidden control
I have 3 buttons in a form. One of them is the submit button.
I have a relatively simple form which asks a variety of questions. One of

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.